Errors not outputting file name next to line number.
samuelmaddock opened this issue · 6 comments
samuelmaddock commented
When gluac detects a syntax error in code, it doesn't output the file name as luac
does. Instead, it seems to output the first string in the file itself. Here's an example to what I'm referring to.
>luac -p commands.lua
luac: commands.lua:11: unexpected symbol near '!'
>gluac -p commands.lua
error: [string "include( 'prop_tools.lua' )..."]:16: ']' expected near 'if'
When running luac
, the file name is visible in the output. However, gluac
seems to be outputting [string "include( 'prop_tools.lua' )..."]
in its place.
sbarisic commented
Fixed
samuelmaddock commented
While the string's contents seem to be fixed, the error message formatting is still off:
>gluac -p test.lua
error: [string "test.lua"]:1: unexpected symbol near 'then'
sbarisic commented
What exactly is wrong with the error message formatting?
sbarisic commented
You mean [string "test.lua"]:1: instead of test.lua:1:?
sbarisic commented
Okay, changed [string "whatever"]:... to whatever:...
samuelmaddock commented
Sorry for the late response, that is what I meant. Thanks for fixing this.