[MacRuby-devel] error location

Eloy Duran eloy.de.enige at gmail.com
Thu Jan 6 16:20:12 PST 2011


The IRB::Source class uses Ripper and might be of help as well.

On 6 jan 2011, at 23:50, Laurent Sansonetti wrote:

> I would catch the SyntaxError exception and poke at its content.
> 
> If you want to catch syntax errors ahead of execution, you can use the ripper extension, which is bundled in MacRuby. It's basically an interface to the Ruby parser and allows you to retrieve the AST.
> 
> Laurent
> 
> On Jan 6, 2011, at 12:13 PM, Joel Reymont wrote:
> 
>> I would like to edit MacRuby code in a Cocoa text window, press a button to "compile" it and display error information in a status line. 
>> 
>> I would also like to highlight the position of the error in my text window. 
>> 
>> How do I programmatically grab the error location from an evaluation or compilation error?
>> 
>> 	Thanks, Joel
>> 
>> ---
>> http://wagerlabs.com | @wagerlabs | http://www.linkedin.com/in/joelreymont
>> 
>> 
>> 
>> 
>> 
>> _______________________________________________
>> MacRuby-devel mailing list
>> MacRuby-devel at lists.macosforge.org
>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
> 
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-devel/attachments/20110107/bcdab977/attachment.html>


More information about the MacRuby-devel mailing list