about summary refs log tree commit diff
path: root/grammar.ebnf
diff options
context:
space:
mode:
authorBaitinq <[email protected]>2025-05-27 19:51:27 +0200
committerBaitinq <[email protected]>2025-05-27 20:38:24 +0200
commit342d5d74be0d839574d05b852a13d2145d9335e3 (patch)
tree90dfe9e96d88cc6ef03061080bfde3783bb77d41 /grammar.ebnf
parentFeature: Start adding structs support (diff)
downloadpry-lang-342d5d74be0d839574d05b852a13d2145d9335e3.tar.gz
pry-lang-342d5d74be0d839574d05b852a13d2145d9335e3.tar.bz2
pry-lang-342d5d74be0d839574d05b852a13d2145d9335e3.zip
Feature: Finish adding struct support :^)
Diffstat (limited to 'grammar.ebnf')
-rw-r--r--grammar.ebnf6
1 files changed, 4 insertions, 2 deletions
diff --git a/grammar.ebnf b/grammar.ebnf
index d203a69..78101f1 100644
--- a/grammar.ebnf
+++ b/grammar.ebnf
@@ -28,9 +28,11 @@ AdditiveExpression ::= MultiplicativeExpression (("+" | "-") MultiplicativeExpre
 
 MultiplicativeExpression ::= UnaryExpression (("*" | "/" | "%") UnaryExpression)*
 
-UnaryExpression ::= ("!" | "-" | "*") UnaryExpression | PrimaryExpression
+UnaryExpression ::= ("!" | "-" | "*") UnaryExpression | PostfixExpression
 
-PrimaryExpression ::= NULL | NUMBER | BOOLEAN | CHAR | STRING | IDENTIFIER | CastStatement | FunctionCallStatement | FunctionDefinition | StructDefinition | StructInstantiation | FieldAccess | LPAREN Expression RPAREN
+PostfixExpression ::= PrimaryExpression (FieldAccess | FunctionCallStatement | CastStatement)*
+
+PrimaryExpression ::= NULL | NUMBER | BOOLEAN | CHAR | STRING | IDENTIFIER | FunctionDefinition | StructDefinition | StructInstantiation | FieldAccess | LPAREN Expression RPAREN
 
 FunctionDefinition ::= LPAREN FunctionParameters? RPAREN ARROW IDENTIFIER LBRACE Statement* ReturnStatement SEMICOLON RBRACE