[MacRuby-devel] error location

Laurent Sansonetti lsansonetti at apple.com
Thu Jan 6 14:50:30 PST 2011


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

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


More information about the MacRuby-devel mailing list