smalltalk: cleanup usings.
parent
06b72b8a0d
commit
0a155def04
|
@ -1,6 +1,7 @@
|
|||
! Copyright (C) 2009 Slava Pestov.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: strings arrays memoize kernel sequences accessors combinators ;
|
||||
USING: accessors arrays combinators kernel memoize sequences
|
||||
strings ;
|
||||
IN: smalltalk.ast
|
||||
|
||||
SINGLETONS: nil self super ;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
! Copyright (C) 2009 Slava Pestov.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: kernel namespaces assocs accessors words sequences classes.tuple ;
|
||||
USING: accessors assocs classes.tuple kernel namespaces words ;
|
||||
IN: smalltalk.classes
|
||||
|
||||
SYMBOL: classes
|
||||
|
|
|
@ -4,8 +4,7 @@ USING: accessors arrays assocs combinators continuations fry
|
|||
generic kernel locals locals.types math quotations sequences
|
||||
sequences.generalizations sets smalltalk.ast smalltalk.classes
|
||||
smalltalk.compiler.assignment smalltalk.compiler.lexenv
|
||||
smalltalk.compiler.return smalltalk.selectors splitting vocabs
|
||||
words ;
|
||||
smalltalk.compiler.return smalltalk.selectors splitting words ;
|
||||
IN: smalltalk.compiler
|
||||
|
||||
GENERIC: compile-ast ( lexenv ast -- quot )
|
||||
|
@ -69,10 +68,7 @@ M: ast-return compile-ast
|
|||
[ [ arguments>> ] [ temporaries>> ] bi append ]
|
||||
[ body>> [ assigned-locals ] map concat fast-set ] bi
|
||||
'[
|
||||
dup dup _ in?
|
||||
[ <local-reader> ]
|
||||
[ <local> ]
|
||||
if
|
||||
dup dup _ in? [ <local-reader> ] [ <local> ] if
|
||||
] H{ } map>assoc
|
||||
dup
|
||||
[ nip local-reader? ] assoc-filter
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
! Copyright (C) 2009 Slava Pestov.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: assocs kernel accessors quotations slots words
|
||||
sequences namespaces combinators combinators.short-circuit
|
||||
summary smalltalk.classes ;
|
||||
USING: accessors assocs combinators combinators.short-circuit
|
||||
kernel namespaces quotations sequences slots smalltalk.classes
|
||||
summary words ;
|
||||
IN: smalltalk.compiler.lexenv
|
||||
|
||||
! local-readers: assoc string => word
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
! Copyright (C) 2009 Slava Pestov.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: io.files io.encodings.utf8
|
||||
compiler.units smalltalk.parser smalltalk.compiler
|
||||
smalltalk.library ;
|
||||
USING: compiler.units io.encodings.utf8 io.files
|
||||
smalltalk.compiler smalltalk.parser ;
|
||||
IN: smalltalk.eval
|
||||
|
||||
: eval-smalltalk ( string -- result )
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
! Copyright (C) 2009 Slava Pestov.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: peg peg.ebnf smalltalk.ast sequences sequences.deep strings
|
||||
math.parser multiline kernel arrays byte-arrays math assocs accessors ;
|
||||
USING: accessors arrays assocs byte-arrays kernel math
|
||||
math.parser multiline peg.ebnf sequences sequences.deep
|
||||
smalltalk.ast strings ;
|
||||
IN: smalltalk.parser
|
||||
|
||||
! :mode=text:noTabs=true:
|
||||
|
@ -131,7 +132,7 @@ BinaryMessage = OptionalWhiteSpace
|
|||
OptionalWhiteSpace
|
||||
(UnaryMessageSend | Operand):rhs
|
||||
=> [[ selector { rhs } ast-message boa ]]
|
||||
|
||||
|
||||
KeywordMessageSegment = Keyword:k OptionalWhiteSpace (BinaryMessageSend | UnaryMessageSend | Operand):arg => [[ { k arg } ]]
|
||||
KeywordMessage = OptionalWhiteSpace
|
||||
KeywordMessageSegment:h
|
||||
|
|
Loading…
Reference in New Issue