Created
April 6, 2020 12:04
-
-
Save matovitch/a2d57afb183da116cb96da30ff339912 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"node": "Program", | |
"functions": [ | |
{ | |
"node": "Function", | |
"name": { | |
"node": "Identifier", | |
"lexeme": { | |
"node": "Lexeme", | |
"index": 42 | |
} | |
}, | |
"arguments": [ | |
{ | |
"node": "Type Claim", | |
"variable": { | |
"node": "Identifier", | |
"lexeme": { | |
"node": "Lexeme", | |
"index": 40 | |
} | |
}, | |
"type": { | |
"node": "Identifier", | |
"lexeme": { | |
"node": "Lexeme", | |
"index": 36 | |
} | |
} | |
} | |
], | |
"returnType": { | |
"node": "Identifier", | |
"lexeme": { | |
"node": "Lexeme", | |
"index": 31 | |
} | |
}, | |
"body": [ | |
{ | |
"node": "Variable Declaration", | |
"typeClaim": { | |
"node": "Type Claim", | |
"variable": { | |
"node": "Identifier", | |
"lexeme": { | |
"node": "Lexeme", | |
"index": 25 | |
} | |
}, | |
"type": { | |
"node": "Identifier", | |
"lexeme": { | |
"node": "Lexeme", | |
"index": 21 | |
} | |
} | |
} | |
}, | |
{ | |
"node": "Assignment", | |
"operator": { | |
"node": "Lexeme", | |
"index": 16 | |
}, | |
"lhs": { | |
"node": "Identifier", | |
"lexeme": { | |
"node": "Lexeme", | |
"index": 18 | |
} | |
}, | |
"rhs": { | |
"node": "Binary Operation", | |
"operator": { | |
"node": "Lexeme", | |
"index": 12 | |
}, | |
"lhs": { | |
"node": "Identifier", | |
"lexeme": { | |
"node": "Lexeme", | |
"index": 14 | |
} | |
}, | |
"rhs": { | |
"node": "Integer", | |
"lexeme": { | |
"node": "Lexeme", | |
"index": 10 | |
} | |
} | |
} | |
}, | |
{ | |
"node": "Return Statement", | |
"expression": { | |
"node": "Identifier", | |
"lexeme": { | |
"node": "Lexeme", | |
"index": 5 | |
} | |
} | |
} | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment