1 ! Copyright (C) 2007, 2008 Slava Pestov, Eduardo Cavazos.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: lexer macros memoize parser sequences vocabs
4 vocabs.loader words kernel namespaces locals.parser locals.types
9 scan locals get [ :>-outside-lambda-error ] unless*
10 [ make-local ] bind <def> parsed ; parsing
12 : [| parse-lambda parsed-lambda ; parsing
15 "|" expect "|" parse-bindings
16 \ ] (parse-lambda) <let> parsed-lambda ; parsing
19 "|" expect "|" parse-bindings*
20 \ ] (parse-lambda) <let*> parsed-lambda ; parsing
23 "|" expect "|" parse-wbindings
24 \ ] (parse-lambda) <wlet> parsed-lambda ; parsing
26 : :: (::) define ; parsing
28 : M:: (M::) define ; parsing
30 : MACRO:: (::) define-macro ; parsing
32 : MEMO:: (::) define-memoized ; parsing
40 "locals.definitions" require
41 "locals.prettyprint" require