core: in-definition -> with-definition.

db4
Doug Coleman 2012-08-24 16:07:31 -07:00
parent b06b6a8261
commit d33dc194ca
3 changed files with 7 additions and 7 deletions

View File

@ -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 ;

View File

@ -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 ;

View File

@ -56,4 +56,4 @@ PRIVATE>
: (M:) ( -- method def )
[
scan-new-method [ parse-method-definition ] with-method-definition
] in-definition ;
] with-definition ;