1 USING: accessors assocs compiler.units kernel lexer locals.backend
2 locals.parser namespaces parser prettyprint sequences sorting
3 tools.test vocabs vocabs.parser ;
4 IN: locals.parser.tests
6 ! XXX: remove the << and >> below and make test-all pass
12 [ load-local 1 drop-locals ]
16 { "dobiedoo ( x -- y ) ;" } <lexer> [ (::) ] with-lexer
17 ] with-compilation-unit
23 [ 2 load-locals 2 drop-locals ]
27 { "dobiedoo ( x y -- z ) ;" } <lexer> [ (::) ] with-lexer
28 ] with-compilation-unit
37 qualified-vocabs last words>> keys "um" swap member?
38 ] with-compilation-unit
44 "hello" check-local-name
49 [ { "a" "b" "c" } make-locals ] with-compilation-unit
50 nip values [ name>> ] map
54 { { "tok1" "tok2" } } [
56 { "tok1 tok2 |" } <lexer> [ parse-local-defs ] with-lexer
57 ] with-compilation-unit
58 nip values [ name>> ] map
67 { "tok1 tok2 )" } <lexer> [ parse-multi-def ] with-lexer
68 ] with-compilation-unit
69 [ locals>> [ name>> ] map ] [ keys ] bi*
78 { "99 :> kkk kkk ;" } <lexer> [
79 H{ } clone [ \ ; parse-until ] with-lambda-scope
81 ] with-compilation-unit unparse