Class: Bake::GreenHillsLinkerErrorParser
- Inherits:
-
ErrorParser
- Object
- ErrorParser
- Bake::GreenHillsLinkerErrorParser
- Defined in:
- lib/bake/toolchain/errorparser/greenhills_linker_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 ⇒ GreenHillsLinkerErrorParser
constructor
dblink: WARNING: 10 problems were encountered while processing debug information, see “Debug/xy.dle” for details.
- #scan_lines(consoleOutput, proj_dir) ⇒ Object
Methods inherited from ErrorParser
#get_severity, #get_tasking_severity, #inv_severity, #makeVsError, #scan
Constructor Details
#initialize ⇒ GreenHillsLinkerErrorParser
dblink: WARNING: 10 problems were encountered while processing debug information, see “Debug/xy.dle” for details.
17 18 19 |
# File 'lib/bake/toolchain/errorparser/greenhills_linker_error_parser.rb', line 17 def initialize() @error_expression = /ld: (.+)/ end |
Instance Method Details
#scan_lines(consoleOutput, proj_dir) ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/bake/toolchain/errorparser/greenhills_linker_error_parser.rb', line 21 def scan_lines(consoleOutput, proj_dir) res = [] error_severity = 255 consoleOutput[0].each_line do |l| l.rstrip! d = ErrorDesc.new scan_res = l.scan(@error_expression) if scan_res.length == 0 # msg will end with the beginning of the next message d.severity = error_severity d. = l elsif scan_res.length > 0 d.file_name = proj_dir d.line_number = 0 d. = scan_res[0][0] d.severity = SEVERITY_ERROR error_severity = d.severity end res << d end [res, consoleOutput[0]] end |