Salvaged from worktree-agent-* branches killed during sx-tree MCP outage: - lua: tokenizer + parser + phase-2 transpile (~157 tests) - prolog: tokenizer + parser + unification (72 tests, plan update lost to WIP) - forth: phase-1 reader/interpreter + phase-2 colon/VARIABLE (134 tests) - erlang: tokenizer + parser (114 tests) - haskell: tokenizer + parse tests (43 tests) Cherry-picked file contents only, not branch history, to avoid pulling in unrelated ocaml-vm merge commits that were in those branches' bases.
33 lines
721 B
Plaintext
33 lines
721 B
Plaintext
(define
|
|
lua-parse-tests
|
|
(list
|
|
(list "empty" "" (list (quote lua-block)))
|
|
(list
|
|
"int literal"
|
|
"return 42"
|
|
(list
|
|
(quote lua-block)
|
|
(list (quote lua-return) (list (list (quote lua-num) 42)))))
|
|
(list
|
|
"local"
|
|
"local x = 1"
|
|
(list
|
|
(quote lua-block)
|
|
(list
|
|
(quote lua-local)
|
|
(list "x")
|
|
(list (list (quote lua-num) 1)))))
|
|
(list
|
|
"binop"
|
|
"return 1 + 2"
|
|
(list
|
|
(quote lua-block)
|
|
(list
|
|
(quote lua-return)
|
|
(list
|
|
(list
|
|
(quote lua-binop)
|
|
"+"
|
|
(list (quote lua-num) 1)
|
|
(list (quote lua-num) 2))))))))
|