diff options
| author | Patrick Schönberger | 2021-07-29 09:58:14 +0200 |
|---|---|---|
| committer | Patrick Schönberger | 2021-07-29 09:58:14 +0200 |
| commit | b64d16088b29615d222d33450cf0315467400e59 (patch) | |
| tree | 7fe3a5bdbe33fe286ad25282ce955bd906097755 /Toc.g4 | |
| parent | 45409c781a9e35df68c43b1e2f028d30bf90c0a0 (diff) | |
| download | toc-b64d16088b29615d222d33450cf0315467400e59.tar.gz toc-b64d16088b29615d222d33450cf0315467400e59.zip | |
toc now uses internal representation instead of ast
Diffstat (limited to 'Toc.g4')
| -rw-r--r-- | Toc.g4 | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -15,9 +15,7 @@ type: typeName; funcDecl: 'func' func;
func: funcName '(' parameter ')' (':' type) body;
-parameter: (firstParameter (additionalParameter)*)?;
-firstParameter: var;
-additionalParameter: ',' var;
+parameter: (var (',' var)*)?;
body: '{' stmt* '}';
@@ -61,10 +59,18 @@ nonOpExpr: funcCall | parenExpr;
nonSubscriptExpr: funcCall
+ | literal
| identifier
| memberAccess
| parenExpr;
+nonAccessExpr: funcCall
+ | literal
+ | identifier
+ | subscript
+ | parenExpr
+ | operatorExpr;
+
funcCall: funcName '(' (expr (',' expr)*)? ')';
operatorExpr: binaryOperator;
|
