Closed federicobond closed 6 years ago
The following code:
function returns(uint) {}
Generates this AST:
{ "type": "FunctionDeclaration", "name": "b", "params": null, "modifiers": [ { "type": "ModifierArgument", "name": "returns", "params": [ { "type": "Identifier", "name": "uint", "start": 41, "end": 45 } ], "start": 33, "end": 46 } ], "body": { /* omitted */ } "is_abstract": false, "start": 20, "end": 72 }
The return type should not be parsed as another modifier, and its arguments are types, not expressions. See here.
The following code:
Generates this AST:
The return type should not be parsed as another modifier, and its arguments are types, not expressions. See here.