core: in-definition -> with-definition.
parent
b06b6a8261
commit
d33dc194ca
|
@ -90,7 +90,7 @@ M: lambda-parser parse-quotation ( -- quotation )
|
|||
scan-new-word
|
||||
[ parse-definition ]
|
||||
parse-locals-definition
|
||||
] in-definition ;
|
||||
] with-definition ;
|
||||
|
||||
: (M::) ( -- word def )
|
||||
[
|
||||
|
@ -99,4 +99,4 @@ M: lambda-parser parse-quotation ( -- quotation )
|
|||
[ parse-definition ]
|
||||
parse-locals-method-definition drop
|
||||
] with-method-definition
|
||||
] in-definition ;
|
||||
] with-definition ;
|
||||
|
|
|
@ -13,8 +13,6 @@ ERROR: stack-effect-omits-dashes ;
|
|||
|
||||
SYMBOL: effect-var
|
||||
|
||||
SYMBOL: in-definition
|
||||
|
||||
<PRIVATE
|
||||
: end-token? ( end token -- token ? ) [ nip ] [ = ] 2bi ; inline
|
||||
: effect-opener? ( token -- token ? ) dup { f "(" "((" "--" } member? ; inline
|
||||
|
@ -54,12 +52,14 @@ PRIVATE>
|
|||
: parse-call( ( accum word -- accum )
|
||||
[ ")" parse-effect ] dip 2array append! ;
|
||||
|
||||
SYMBOL: in-definition
|
||||
|
||||
ERROR: can't-nest-definitions word ;
|
||||
|
||||
: check-in-definition ( -- )
|
||||
in-definition get [ word can't-nest-definitions ] when ;
|
||||
|
||||
: in-definition ( quot -- )
|
||||
: with-definition ( quot -- )
|
||||
[ check-in-definition t in-definition ] dip with-variable ; inline
|
||||
|
||||
: (:) ( -- word def effect )
|
||||
|
@ -67,4 +67,4 @@ ERROR: can't-nest-definitions word ;
|
|||
scan-new-word
|
||||
scan-effect
|
||||
parse-definition swap
|
||||
] in-definition ;
|
||||
] with-definition ;
|
||||
|
|
|
@ -56,4 +56,4 @@ PRIVATE>
|
|||
: (M:) ( -- method def )
|
||||
[
|
||||
scan-new-method [ parse-method-definition ] with-method-definition
|
||||
] in-definition ;
|
||||
] with-definition ;
|
||||
|
|
Loading…
Reference in New Issue