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
9 [ load-local 1 drop-locals ]
13 { "dobiedoo ( x -- y ) ;" } <lexer> [ (::) ] with-lexer
14 ] with-compilation-unit
20 [ 2 load-locals 2 drop-locals ]
24 { "dobiedoo ( x y -- z ) ;" } <lexer> [ (::) ] with-lexer
25 ] with-compilation-unit
34 qualified-vocabs last words>> keys "um" swap member?
35 ] with-compilation-unit
40 "hello" check-local-name
45 [ { "a" "b" "c" } make-locals ] with-compilation-unit
46 nip values [ name>> ] map
50 { { "tok1" "tok2" } } [
52 { "tok1 tok2 |" } <lexer> [ parse-local-defs ] with-lexer
53 ] with-compilation-unit
54 nip values [ name>> ] map
63 { "tok1 tok2 )" } <lexer> [ parse-multi-def ] with-lexer
64 ] with-compilation-unit
65 [ locals>> [ name>> ] map ] [ keys ] bi*
73 { "99 :> kkk kkk ;" } <lexer> [
74 H{ } clone [ \ ; parse-until ] with-lambda-scope
76 ] with-compilation-unit unparse