match: use word property instead of leading '?' to identify match vars
parent
1369f6f5b2
commit
82c74ce1ba
|
@ -9,7 +9,7 @@ SYMBOL: _
|
|||
USE: prettyprint
|
||||
|
||||
: define-match-var ( name -- )
|
||||
create-in [ dup <wrapper> , \ get , ] [ ] make define-compound ;
|
||||
create-in dup t "match-var" set-word-prop [ dup <wrapper> , \ get , ] [ ] make define-compound ;
|
||||
|
||||
: define-match-vars ( seq -- )
|
||||
[ define-match-var ] each ;
|
||||
|
@ -19,7 +19,7 @@ USE: prettyprint
|
|||
|
||||
: match-var? ( symbol -- bool )
|
||||
dup word? [
|
||||
word-name first CHAR: ? =
|
||||
"match-var" word-prop
|
||||
] [
|
||||
drop f
|
||||
] if ;
|
||||
|
|
Loading…
Reference in New Issue