update grammar and test file

This commit is contained in:
acereca 2023-04-12 21:46:06 +02:00
parent e4fa4ea905
commit 5b12d75c47
2 changed files with 3 additions and 3 deletions

View File

@ -16,7 +16,7 @@ cstyle_list = @{ token ~ lisp_list}
list = { (cstyle_list | lisp_list | lazy_list) } list = { (cstyle_list | lisp_list | lazy_list) }
assign = {token ~ "=" ~ (inline_expr | list | token)} assign = {token ~ "=" ~ (inline_expr | list | token | literal)}
inline_operand = _{(list | token | literal)} inline_operand = _{(list | token | literal)}
inline_operator = {("-" | "+" | "/" | "*")} inline_operator = {("-" | "+" | "/" | "*")}
inline_expr = {inline_operand ~ (inline_operator ~ inline_operand)+} inline_expr = {inline_operand ~ (inline_operator ~ inline_operand)+}
@ -25,4 +25,4 @@ get_operator = {("->" | "~>")}
get = {token ~ get_operator ~ (list | token)} get = {token ~ get_operator ~ (list | token)}
expr = _{(get | assign | list | token | literal)} expr = _{(get | assign | list | token | literal)}
skill = { SOI ~ expr* ~ EOI } skill = { SOI ~ expr* ~ EOI }

View File

@ -19,4 +19,4 @@ obj->op()
(let (a (b 3)) (let (a (b 3))
expr1 expr1
expr2 expr2
) )