lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

>From Wed Aug 18 22:40:00 1999
>From: Dave Bollinger <>

>Hmm, I wonder
>how much of the Lua source I'd have to mess with in order to get it to do
>just a lex/parse for me and return an error in a form that I could use to
>highlight the error in an editor?

You don't really have to mess with the code.
Just set up your own error handler and call lua_dostring.
You may have to add "do return end" in front of the string in case the
string contains no errors.
If there are errors, your error handler will be called and you can parse
the error message to get the location.