update grammar and test file

This commit is contained in:
acereca 2023-04-12 21:46:06 +02:00
parent d0805e3302
commit 3e86d2d1a3
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) }
assign = {token ~ "=" ~ (inline_expr | list | token)}
assign = {token ~ "=" ~ (inline_expr | list | token | literal)}
inline_operand = _{(list | token | literal)}
inline_operator = {("-" | "+" | "/" | "*")}
inline_expr = {inline_operand ~ (inline_operator ~ inline_operand)+}
@ -25,4 +25,4 @@ get_operator = {("->" | "~>")}
get = {token ~ get_operator ~ (list | token)}
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))
expr1
expr2
)
)