We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The unm operator is ignored during the ast_to_src transformation.
The source code bug.lua
a = -1
The test code test.lua
require 'metalua.loader' mlc = require 'metalua.compiler'.new() ast = mlc:srcfile_to_ast("bug.lua") pp = require 'metalua.pprint' local cfg = { line_max=1, fix_indent=2, metalua_tag=1, hide_hash=1 } pp.print(ast, cfg) str = mlc:ast_to_src(ast) print(str)
The result
$ lua test.lua { `Set{ { `Id "a" }, { `Op{ "unm", `Number "1" } } } } a = 1
The text was updated successfully, but these errors were encountered:
Processes unary minus correctly
a936864
ast2src cannot handle minus (fab13n#25) Credits: wanghc78 (fab13n#26)
No branches or pull requests
The unm operator is ignored during the ast_to_src transformation.
The source code bug.lua
The test code test.lua
The result
The text was updated successfully, but these errors were encountered: