Bug 445692 - ast_to_src can't handle unary minus and other things
Summary: ast_to_src can't handle unary minus and other things
Status: UNCONFIRMED
Alias: None
Product: LDT
Classification: Tools
Component: Metalua (show other bugs)
Version: unspecified   Edit
Hardware: All Windows 7
: P3 normal
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-01 12:19 EDT by Shviller - CLA
Modified: 2014-10-01 12:19 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Shviller - CLA 2014-10-01 12:19:50 EDT
Unary minus is stripped from the code that's output by ast_to_src. Code such as
 "literal":len()
can be produced which Lua considers invalid (the literal needs to be wrapped in parens).
This pull request: https://github.com/fab13n/metalua/pull/30
contains fixes that allow ast_to_src to produce valid Lua code for all examples I used it on so far. Please take a look. Thanks in advance!