[SVN] r2899

Allan Odgaard throw-away-1 at macromates.com
Mon Mar 27 12:26:03 UTC 2006


This module contains a generic “parse errors” function for use when post-processing compiler output.

It looks for lines of the form:
   «file»:«line»:«text»

Lines found are turned into HTML-links to the file and only the «text» part is shown. The line number is optional, and only if the file exists on disk, will the line be a link (it resolves relative files using the current working directory).

The parser also does necessary entity escaping of the text which is passed thru.

Use it e.g. like this:
   g++ -Wall "$TM_FILENAME"|ruby -rtm_parser -eTextMate.parse_errors

Initially i intended for the script to receive arguments for what to markup, but probably it would be better just to have the script match the de facto error formats. Then we could also wrap the above ruby line in a bash function, so using it would just be adding “|parse_errors” to make or whatever shell command the user runs.

Changed:
A   trunk/Support/lib/tm_parser.rb



More information about the textmate-dev mailing list