about summary refs log tree commit diff
path: root/grammar.ebnf
diff options
context:
space:
mode:
authorBaitinq <[email protected]>2025-04-28 22:12:46 +0200
committerBaitinq <[email protected]>2025-04-28 22:12:46 +0200
commit8b969bfe7d7e9b98af6c780c567155c699cfe3e5 (patch)
treee37cd9b9c8ea36ad869afd0e6e7c0b047456ed8b /grammar.ebnf
parentBootstrap: Iterate chars (diff)
downloadpry-lang-import.tar.gz
pry-lang-import.tar.bz2
pry-lang-import.zip
Start implementing import functionality import
Diffstat (limited to '')
-rw-r--r--grammar.ebnf4
1 files changed, 3 insertions, 1 deletions
diff --git a/grammar.ebnf b/grammar.ebnf
index 18d71da..70a1bfd 100644
--- a/grammar.ebnf
+++ b/grammar.ebnf
@@ -1,9 +1,11 @@
 Program      ::= Statement+
 
-Statement    ::= (AssignmentStatement | ExternDeclaration | FunctionCallStatement | IfStatement | WhileStatement | ReturnStatement) SEMICOLON
+Statement    ::= (AssignmentStatement | ImportDeclaration | ExternDeclaration | FunctionCallStatement | IfStatement | WhileStatement | ReturnStatement) SEMICOLON
 
 AssignmentStatement ::= ("let")? ("*")? Expression EQUALS Expression
 
+ImportDeclaration ::= "import" STRING
+
 ExternDeclaration ::= "extern" IDENTIFIER EQUALS Type
 
 FunctionCallStatement ::= (IDENTIFIER | FunctionDefinition) LPAREN FunctionArguments? RPAREN