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