diff options
| author | Baitinq <[email protected]> | 2025-05-20 22:54:16 +0200 |
|---|---|---|
| committer | Baitinq <[email protected]> | 2025-05-20 22:54:16 +0200 |
| commit | 7b4fba9ae9c65fc5fc341d73446bde1eab4329f5 (patch) | |
| tree | d4b235726eb2da92536e71e22a026e3285adc355 /grammar.ebnf | |
| parent | Codegen: Implement proper type comparisons (diff) | |
| download | interpreter-7b4fba9ae9c65fc5fc341d73446bde1eab4329f5.tar.gz interpreter-7b4fba9ae9c65fc5fc341d73446bde1eab4329f5.tar.bz2 interpreter-7b4fba9ae9c65fc5fc341d73446bde1eab4329f5.zip | |
Feature: Add support for casting types
Diffstat (limited to 'grammar.ebnf')
| -rw-r--r-- | grammar.ebnf | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/grammar.ebnf b/grammar.ebnf index bd38952..3806ee6 100644 --- a/grammar.ebnf +++ b/grammar.ebnf @@ -18,7 +18,9 @@ ReturnStatement ::= RETURN (Expression)? FunctionArguments ::= Expression ("," Expression)* -Expression ::= EqualityExpression | AdditiveExpression +Expression ::= EqualityExpression | AdditiveExpression | CastExpression + +CastExpression ::= "cast" LPAREN TYPE "," Expression RPAREN EqualityExpression ::= AdditiveExpression ("==" | "!=" | "<=" | ">=" | "<" | ">") AdditiveExpression |