Sha256: 6172f1237cccff5c6ee2de8450a92b325bf78e8d1d59e8254f146b78cbaec9cf

Contents?: true

Size: 951 Bytes

Versions: 42

Compression:

Stored size: 951 Bytes

Contents

require_relative 'error_parser'

module Bake
  class IARLinkerErrorParser < ErrorParser

    def initialize()
      @error_expression = /([A-Za-z]+)\[\w+\]:\s*(.+)/
    end

    def scan_lines(consoleOutput, proj_dir)
      res = []
      lastValidErrorDesc = nil
      consoleOutput[0].each_line do |l|
        l.rstrip!
        d = ErrorDesc.new
        scan_res = l.scan(@error_expression)
        if scan_res.length > 0
          d.file_name = proj_dir
          d.line_number = 0
          d.message = scan_res[0][1]
          d.severity = get_severity(scan_res[0][0])
          error_severity = d.severity
          lastValidErrorDesc = d
        else
          if lastValidErrorDesc
            lastValidErrorDesc.message += l.lstrip
            d.severity = lastValidErrorDesc.severity
          else
            d.severity = SEVERITY_ERROR
          end
        end
        res << d
      end
      [res, consoleOutput[0]]
    end

  end
end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
bake-toolkit-2.62.0 lib/bake/toolchain/errorparser/iar_linker_error_parser.rb
bake-toolkit-2.61.0 lib/bake/toolchain/errorparser/iar_linker_error_parser.rb
bake-toolkit-2.60.2 lib/bake/toolchain/errorparser/iar_linker_error_parser.rb
bake-toolkit-2.60.0 lib/bake/toolchain/errorparser/iar_linker_error_parser.rb
bake-toolkit-2.59.0 lib/bake/toolchain/errorparser/iar_linker_error_parser.rb
bake-toolkit-2.58.0 lib/bake/toolchain/errorparser/iar_linker_error_parser.rb
bake-toolkit-2.57.0 lib/bake/toolchain/errorparser/iar_linker_error_parser.rb
bake-toolkit-2.56.0 lib/bake/toolchain/errorparser/iar_linker_error_parser.rb
bake-toolkit-2.55.1 lib/bake/toolchain/errorparser/iar_linker_error_parser.rb
bake-toolkit-2.55.0 lib/bake/toolchain/errorparser/iar_linker_error_parser.rb
bake-toolkit-2.54.3 lib/bake/toolchain/errorparser/iar_linker_error_parser.rb
bake-toolkit-2.54.2 lib/bake/toolchain/errorparser/iar_linker_error_parser.rb
bake-toolkit-2.54.1 lib/bake/toolchain/errorparser/iar_linker_error_parser.rb
bake-toolkit-2.54.0 lib/bake/toolchain/errorparser/iar_linker_error_parser.rb
bake-toolkit-2.53.0 lib/bake/toolchain/errorparser/iar_linker_error_parser.rb
bake-toolkit-2.52.1 lib/bake/toolchain/errorparser/iar_linker_error_parser.rb
bake-toolkit-2.52.0 lib/bake/toolchain/errorparser/iar_linker_error_parser.rb
bake-toolkit-2.51.2 lib/bake/toolchain/errorparser/iar_linker_error_parser.rb
bake-toolkit-2.51.1 lib/bake/toolchain/errorparser/iar_linker_error_parser.rb
bake-toolkit-2.51.0 lib/bake/toolchain/errorparser/iar_linker_error_parser.rb