infix: fix to allow nested local scopes.
parent
20a663ab0b
commit
2b23d75544
|
@ -1,9 +1,9 @@
|
||||||
! Copyright (C) 2009 Philipp Brüschweiler
|
! Copyright (C) 2009 Philipp Brüschweiler
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: accessors assocs combinators effects effects.parser fry
|
USING: accessors combinators effects effects.parser fry
|
||||||
infix.ast infix.parser kernel locals locals.parser math
|
infix.ast infix.parser kernel locals locals.parser locals.types
|
||||||
math.functions math.order math.ranges multiline namespaces
|
math math.functions math.order math.ranges multiline parser
|
||||||
parser quotations sequences summary vocabs.parser words ;
|
quotations sequences summary vocabs.parser words ;
|
||||||
IN: infix
|
IN: infix
|
||||||
|
|
||||||
<PRIVATE
|
<PRIVATE
|
||||||
|
@ -15,8 +15,8 @@ M: local-not-defined summary
|
||||||
drop "local is not defined" ;
|
drop "local is not defined" ;
|
||||||
|
|
||||||
: >local-word ( string -- word )
|
: >local-word ( string -- word )
|
||||||
qualified-vocabs last words>> ?at
|
dup search dup local?
|
||||||
[ local-not-defined ] unless ;
|
[ nip ] [ drop local-not-defined ] if ;
|
||||||
|
|
||||||
ERROR: invalid-op string ;
|
ERROR: invalid-op string ;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue