Sha256: c86da2c484b7195d27f42117cabececd57feae390859d5fe75d18a9b669f5568

Contents?: true

Size: 895 Bytes

Versions: 38

Compression:

Stored size: 895 Bytes

Contents

require 'bake/toolchain/errorparser/error_parser'

module Bake
  class TICompilerErrorParser < ErrorParser

    def initialize()
      @error_expression = /\"([^,^\"]+)\", line ([0-9]+)[:0-9]* (catastrophic |fatal )*([A-Za-z]+): (.+)/
    end

    def scan_lines(consoleOutput, proj_dir)
      res = []
      consoleOutputFullnames = ""
      consoleOutput[0].each_line do |l|
        d = ErrorDesc.new
        scan_res = l.gsub(/\r\n?/, "").scan(@error_expression)
        if scan_res.length > 0
          d.file_name = File.expand_path(scan_res[0][0])
          d.line_number = scan_res[0][1].to_i
          d.message = scan_res[0][4]
          d.severity = get_severity(scan_res[0][3])
          l.gsub!(scan_res[0][0],d.file_name)
        end
        res << d
        consoleOutputFullnames << l
      end
      [res, consoleOutputFullnames]
    end

  end
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
bake-toolkit-2.20.4 lib/bake/toolchain/errorparser/ti_compiler_error_parser.rb
bake-toolkit-2.20.3 lib/bake/toolchain/errorparser/ti_compiler_error_parser.rb
bake-toolkit-2.20.2 lib/bake/toolchain/errorparser/ti_compiler_error_parser.rb
bake-toolkit-2.20.1 lib/bake/toolchain/errorparser/ti_compiler_error_parser.rb
bake-toolkit-2.19.2 lib/bake/toolchain/errorparser/ti_compiler_error_parser.rb
bake-toolkit-2.19.1 lib/bake/toolchain/errorparser/ti_compiler_error_parser.rb
bake-toolkit-2.19.0 lib/bake/toolchain/errorparser/ti_compiler_error_parser.rb
bake-toolkit-2.18.0 lib/bake/toolchain/errorparser/ti_compiler_error_parser.rb
bake-toolkit-2.17.4 lib/bake/toolchain/errorparser/ti_compiler_error_parser.rb
bake-toolkit-2.17.3 lib/bake/toolchain/errorparser/ti_compiler_error_parser.rb
bake-toolkit-2.17.2 lib/bake/toolchain/errorparser/ti_compiler_error_parser.rb
bake-toolkit-2.17.1 lib/bake/toolchain/errorparser/ti_compiler_error_parser.rb
bake-toolkit-2.16.1 lib/bake/toolchain/errorparser/ti_compiler_error_parser.rb
bake-toolkit-2.15.0 lib/bake/toolchain/errorparser/ti_compiler_error_parser.rb
bake-toolkit-2.14.0 lib/bake/toolchain/errorparser/ti_compiler_error_parser.rb
bake-toolkit-2.13.1 lib/bake/toolchain/errorparser/ti_compiler_error_parser.rb
bake-toolkit-2.13.0 lib/bake/toolchain/errorparser/ti_compiler_error_parser.rb
bake-toolkit-2.12.2 lib/bake/toolchain/errorparser/ti_compiler_error_parser.rb
bake-toolkit-2.12.1 lib/bake/toolchain/errorparser/ti_compiler_error_parser.rb
bake-toolkit-2.12.0 lib/bake/toolchain/errorparser/ti_compiler_error_parser.rb