Class: Bake::TaskingCompilerErrorParser
- Inherits:
-
ErrorParser
- Object
- ErrorParser
- Bake::TaskingCompilerErrorParser
- Defined in:
- lib/bake/toolchain/errorparser/tasking_compiler_error_parser.rb
Constant Summary
Constants inherited from ErrorParser
ErrorParser::SEVERITY_ERROR, ErrorParser::SEVERITY_INFO, ErrorParser::SEVERITY_OK, ErrorParser::SEVERITY_WARNING
Instance Method Summary collapse
-
#initialize ⇒ TaskingCompilerErrorParser
constructor
A new instance of TaskingCompilerErrorParser.
- #scan_lines(consoleOutput, proj_dir) ⇒ Object
Methods inherited from ErrorParser
#get_severity, #get_tasking_severity, #inv_severity, #makeVsError, #scan
Constructor Details
#initialize ⇒ TaskingCompilerErrorParser
Returns a new instance of TaskingCompilerErrorParser.
6 7 8 9 |
# File 'lib/bake/toolchain/errorparser/tasking_compiler_error_parser.rb', line 6 def initialize() @error_expression = /.* (.+): \[\"(.+)\" ([0-9]+)\/*[0-9]*\] (.*)/ @error_expression2 = /.* (.+): (.+) “(.*)”/ end |
Instance Method Details
#scan_lines(consoleOutput, proj_dir) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/bake/toolchain/errorparser/tasking_compiler_error_parser.rb', line 11 def scan_lines(consoleOutput, proj_dir) res = [] consoleOutputFullnames = "" consoleOutput[0].each_line do |l| d = ErrorDesc.new lstripped = l.rstrip scan_res = lstripped.scan(@error_expression) if scan_res.length > 0 d.file_name = File.(scan_res[0][1], proj_dir) d.line_number = scan_res[0][2].to_i d. = scan_res[0][3] d.severity = get_tasking_severity(scan_res[0][0]) l.gsub!(scan_res[0][1],d.file_name) end scan_res = lstripped.scan(@error_expression2) if scan_res.length > 0 d.file_name = File.(scan_res[0][2], proj_dir) d.line_number = 0 d. = scan_res[0][1] d.severity = get_tasking_severity(scan_res[0][0]) l.gsub!(scan_res[0][2],d.file_name) end res << d consoleOutputFullnames << l end [res, consoleOutputFullnames] end |