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 [ 1 load-locals 1 drop-locals ]
16 { "dobiedoo ( x -- y ) ;" } <lexer> [ (::) ] with-lexer
17 ] with-compilation-unit
26 qualified-vocabs last words>> keys "um" swap member?
27 ] with-compilation-unit
33 "hello" check-local-name
38 [ { "a" "b" "c" } make-locals ] with-compilation-unit
39 nip values [ name>> ] map
43 { { "tok1" "tok2" } } [
45 { "tok1 tok2 |" } <lexer> [ parse-local-defs ] with-lexer
46 ] with-compilation-unit
47 nip values [ name>> ] map
56 { "tok1 tok2 )" } <lexer> [ parse-multi-def ] with-lexer
57 ] with-compilation-unit
58 [ locals>> [ name>> ] map ] [ keys ] bi*
67 { "99 :> kkk kkk ;" } <lexer> [
68 H{ } clone [ \ ; parse-until ] with-lambda-scope
70 ] with-compilation-unit unparse