-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
better structure pointer types in the ast which means we can now also…
… support sized array definitions
- Loading branch information
Showing
2 changed files
with
44 additions
and
17 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,21 +34,23 @@ outputs following AST: | |
[ | ||
{ | ||
"type": "GlobalVariableDeclaration", | ||
"modifier": [], | ||
"pointer": 0, | ||
"defType": { | ||
"type": "Type", | ||
"modifier": [], | ||
"name": "int" | ||
}, | ||
"name": "answer", | ||
"valueType": "int", | ||
"value": { | ||
"type": "BinaryExpression", | ||
"operator": "*", | ||
"right": { | ||
"left": { | ||
"type": "Literal", | ||
"value": 7 | ||
"value": 6, | ||
}, | ||
"left": { | ||
"right": { | ||
"type": "Literal", | ||
"value": 6 | ||
} | ||
"value": 7, | ||
}, | ||
} | ||
} | ||
] | ||
|
@@ -58,7 +60,7 @@ outputs following AST: | |
``` | ||
"THE BEER-WARE LICENSE": | ||
Jakob Löw <[email protected]> wrote this code. As long as you retain this notice you | ||
Jakob Löw <[email protected]> wrote this code. As long as you retain this notice you | ||
can do whatever you want with this stuff. If we meet some day, and you think | ||
this stuff is worth it, you can buy me a beer in return. | ||
``` |
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