You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test.moon Compile error: ...l/share/lua/5.1/moonscript/transform/transformer.lua:23: table index is nil
stack traceback:
...l/share/lua/5.1/moonscript/transform/transformer.lua:23: in function <...l/share/lua/5.1/moonscript/transform/transformer.lua:19>
(tail call): ?
/usr/local/share/lua/5.1/moonscript/compile.lua:476: in function 'value'
...usr/local/share/lua/5.1/moonscript/compile/value.lua:120: in function 'fn'
/usr/local/share/lua/5.1/moonscript/compile.lua:491: in function 'value'
...local/share/lua/5.1/moonscript/compile/statement.lua:96: in function <...local/share/lua/5.1/moonscript/compile/statement.lua:91>
...local/share/lua/5.1/moonscript/compile/statement.lua:100: in function 'fn'
/usr/local/share/lua/5.1/moonscript/compile.lua:530: in function 'stm'
/usr/local/share/lua/5.1/moonscript/compile.lua:564: in function 'stms'
...local/share/lua/5.1/moonscript/compile/statement.lua:235: in function 'fn'
/usr/local/share/lua/5.1/moonscript/compile.lua:530: in function 'stm'
/usr/local/share/lua/5.1/moonscript/compile.lua:564: in function </usr/local/share/lua/5.1/moonscript/compile.lua:555>
(tail call): ?
/usr/local/share/lua/5.1/moonscript/compile.lua:530: in function 'stm'
/usr/local/share/lua/5.1/moonscript/compile.lua:564: in function </usr/local/share/lua/5.1/moonscript/compile.lua:555>
(tail call): ?
(tail call): ?
I know that in that case the code is invalid, but i found that issue with valid code (within a with block).
Even if the code is erronous, an error like that shouldn't be generated (since it's an internal error).
moonc -T test.moon and moonc -b test.moon generates the same error without displaying more information.
The text was updated successfully, but these errors were encountered:
that's not really a problem with invalid code, but yeah, the fact that it also does this on valid code is bad and IMO makes this a valid issue
that's how all moonscript errors look and while I agree that this is pretty user-unfriendly, I don't think anyone has any plan to change it
they seem to transform the AST before printing anything so they can't be used to debug this
I guess the expected behavior would be that
local c
with a
c =\b
should be the same as
c = a\b
which would roughly translate to
c =(...)-> a\b ...
as stated by
The with block helps to alleviate this. Within a with block we can use a special statements that begin with either . or \ which represent those operations applied to the object we are using with on.
Generates the error :
with
block).moonc -T test.moon
andmoonc -b test.moon
generates the same error without displaying more information.The text was updated successfully, but these errors were encountered: