In the case of IRB, it's mostly because of collecting data about the code, e.g. at what indentation level is the current code. Besides that I prefer not to use exceptions for control flow :)
PS: In case you are writing some kind of REPL as part of a bigger app, contact me off list, because we might be overlapping work on that part. On Fri, Jan 7, 2011 at 1:22 AM, Joel Reymont <joe...@gmail.com> wrote: > > On Jan 7, 2011, at 12:20 AM, Eloy Duran wrote: > >> The IRB::Source class uses Ripper and might be of help as well. > > Why would it be beneficial to catch syntax errors before execution by getting > hold of the AST using Ripper? > > --- > http://wagerlabs.com | @wagerlabs | http://www.linkedin.com/in/joelreymont > > > > > > _______________________________________________ > MacRuby-devel mailing list > MacRuby-devel@lists.macosforge.org > http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel > _______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel