about summary refs log tree commit diff
path: root/grammar.ebnf
diff options
context:
space:
mode:
authorBaitinq <[email protected]>2025-05-10 16:05:51 +0200
committerBaitinq <[email protected]>2025-05-10 16:05:51 +0200
commitff00882673bae48ff2ddbc9f66e79efd624824ef (patch)
tree8f885c4914cee352d9a2cabcd80c870b90dddbf5 /grammar.ebnf
parentExamples: Add example sorting array (diff)
downloadpry-lang-ff00882673bae48ff2ddbc9f66e79efd624824ef.tar.gz
pry-lang-ff00882673bae48ff2ddbc9f66e79efd624824ef.tar.bz2
pry-lang-ff00882673bae48ff2ddbc9f66e79efd624824ef.zip
Feature: Support returning void from functions
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 70a1bfd..837de9e 100644
--- a/grammar.ebnf
+++ b/grammar.ebnf
@@ -14,7 +14,7 @@ IfStatement ::= "if" Expression LBRACE Statement* RBRACE -- TODO: Should functio
 
 WhileStatement ::= "while" Expression LBRACE Statement* RBRACE
 
-ReturnStatement ::= RETURN Expression
+ReturnStatement ::= RETURN (Expression)?
 
 FunctionArguments ::= Expression ("," Expression)*