core: Fix how \words are parsed.
parent
199e710597
commit
29708329ab
|
@ -81,7 +81,7 @@ ERROR: can't-nest-definitions word ;
|
||||||
|
|
||||||
: (:) ( -- word def effect )
|
: (:) ( -- word def effect )
|
||||||
[
|
[
|
||||||
scan-new-syntax-word
|
scan-new-word
|
||||||
scan-effect
|
scan-effect
|
||||||
parse-definition swap
|
parse-definition swap
|
||||||
] with-definition ;
|
] with-definition ;
|
||||||
|
|
|
@ -70,7 +70,7 @@ ERROR: number-expected ;
|
||||||
?scan-token parse-word ;
|
?scan-token parse-word ;
|
||||||
|
|
||||||
: scan-syntax-word ( -- word )
|
: scan-syntax-word ( -- word )
|
||||||
?scan-token "\\" ?head drop parse-word ;
|
?scan-token parse-word ;
|
||||||
|
|
||||||
: scan-number ( -- number )
|
: scan-number ( -- number )
|
||||||
?scan-token parse-number ;
|
?scan-token parse-number ;
|
||||||
|
@ -90,15 +90,6 @@ ERROR: invalid-word-name string ;
|
||||||
: scan-new-word ( -- word )
|
: scan-new-word ( -- word )
|
||||||
scan-new dup reset-generic ;
|
scan-new dup reset-generic ;
|
||||||
|
|
||||||
: scan-syntax-word-name ( -- string )
|
|
||||||
scan-word-name "\\" ?head drop ;
|
|
||||||
|
|
||||||
: scan-new-syntax ( -- word )
|
|
||||||
scan-syntax-word-name create-word-in ;
|
|
||||||
|
|
||||||
: scan-new-syntax-word ( -- word )
|
|
||||||
scan-new-syntax dup reset-generic ;
|
|
||||||
|
|
||||||
ERROR: staging-violation word ;
|
ERROR: staging-violation word ;
|
||||||
|
|
||||||
: (execute-parsing) ( accum word -- accum )
|
: (execute-parsing) ( accum word -- accum )
|
||||||
|
|
|
@ -124,7 +124,7 @@ IN: bootstrap.syntax
|
||||||
"deprecated" [ last-word make-deprecated ] define-core-syntax
|
"deprecated" [ last-word make-deprecated ] define-core-syntax
|
||||||
|
|
||||||
"SYNTAX:" [
|
"SYNTAX:" [
|
||||||
scan-new-syntax-word
|
scan-new-word
|
||||||
mark-top-level-syntax
|
mark-top-level-syntax
|
||||||
parse-definition define-syntax
|
parse-definition define-syntax
|
||||||
] define-core-syntax
|
] define-core-syntax
|
||||||
|
@ -153,7 +153,7 @@ IN: bootstrap.syntax
|
||||||
] define-core-syntax
|
] define-core-syntax
|
||||||
|
|
||||||
"ALIAS:" [
|
"ALIAS:" [
|
||||||
scan-new-syntax-word scan-syntax-word define-alias
|
scan-new-word scan-word define-alias
|
||||||
] define-core-syntax
|
] define-core-syntax
|
||||||
|
|
||||||
"CONSTANT:" [
|
"CONSTANT:" [
|
||||||
|
|
Loading…
Reference in New Issue