aboutsummaryrefslogtreecommitdiffstats
path: root/src/grammar.pest
diff options
context:
space:
mode:
Diffstat (limited to 'src/grammar.pest')
-rw-r--r--src/grammar.pest4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/grammar.pest b/src/grammar.pest
index 333a58e..bfb783b 100644
--- a/src/grammar.pest
+++ b/src/grammar.pest
@@ -4,7 +4,7 @@ program = { SOI ~ statement+ ~ EOI }
statement = { (definition | expression) ~ NEWLINE* }
definition = { symbol+ ~ "=" ~ expression }
expression = { expression_node+ }
-expression_node = { integer_literal | operator | symbol | ("(" ~ expression ~ ")") }
-operator = { "+" | "-" | "/" | "*" }
+expression_node = { integer_literal | builtin | symbol | ("(" ~ expression ~ ")") }
+builtin = { "+" | "-" | "/" | "*" }
integer_literal = @{ "-"? ~ ASCII_DIGIT+ }
symbol = @{ ASCII_ALPHA ~ (ASCII_ALPHANUMERIC | "-" | ".")* } \ No newline at end of file