Recover agent-loop progress: lua/prolog/forth/erlang/haskell phases 1-2
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.
This commit is contained in:
32
lib/lua/tests/parse.sx
Normal file
32
lib/lua/tests/parse.sx
Normal file
@@ -0,0 +1,32 @@
|
||||
(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))))))))
|
||||
Reference in New Issue
Block a user