Closed timesong closed 8 years ago
For example,
var a = 2;
AST element is:
{ "type": "ExpressionStatement", "expression": { "operator": "=", "right": { "raw": null, "type": "Literal", "value": 2.0 }, "type": "AssignmentExpression", "left": { "type": "Identifier", "name": "a" } } }
Do you have a solution for this issue?
In JavaScript there is no distinction between integer and float and all values are treated as float. You can easily adjust it to your needs with val = int(val) if int(val)==val else val .
For example,
AST element is:
Do you have a solution for this issue?