about summary refs log tree commit diff
path: root/grammar.ebnf
diff options
context:
space:
mode:
authorBaitinq <[email protected]>2025-02-15 10:56:08 +0100
committerBaitinq <[email protected]>2025-02-15 11:00:04 +0100
commitfa6d9cdf57db4244a331035d35d1b962630e3ae1 (patch)
treed3926279eb046bbc11d4102ba8b336d037596da1 /grammar.ebnf
parentExamples: Update initial example with types (diff)
downloadinterpreter-fa6d9cdf57db4244a331035d35d1b962630e3ae1.tar.gz
interpreter-fa6d9cdf57db4244a331035d35d1b962630e3ae1.tar.bz2
interpreter-fa6d9cdf57db4244a331035d35d1b962630e3ae1.zip
Feature: Introduce initial support for function return types
Diffstat (limited to 'grammar.ebnf')
-rw-r--r--grammar.ebnf2
1 files changed, 1 insertions, 1 deletions
diff --git a/grammar.ebnf b/grammar.ebnf
index 7175f6a..9265242 100644
--- a/grammar.ebnf
+++ b/grammar.ebnf
@@ -26,6 +26,6 @@ UnaryExpression ::= ("!" | "-") UnaryExpression | PrimaryExpression
 
 PrimaryExpression ::= NUMBER | BOOLEAN | IDENTIFIER | FunctionCallStatement | FunctionDefinition | LPAREN Expression RPAREN
 
-FunctionDefinition ::= LPAREN FunctionParameters? RPAREN ARROW LBRACE Statement* ReturnStatement SEMICOLON RBRACE
+FunctionDefinition ::= LPAREN FunctionParameters? RPAREN ARROW IDENTIFIER LBRACE Statement* ReturnStatement SEMICOLON RBRACE
 
 FunctionParameters ::= IDENTIFIER ("," IDENTIFIER)*