core: Fix how \words are parsed.

modern-harvey2
Doug Coleman 2017-08-27 19:36:54 -05:00
parent 199e710597
commit 29708329ab
3 changed files with 4 additions and 13 deletions
core
effects/parser

View File

@ -81,7 +81,7 @@ ERROR: can't-nest-definitions word ;
: (:) ( -- word def effect )
[
scan-new-syntax-word
scan-new-word
scan-effect
parse-definition swap
] with-definition ;

View File

@ -70,7 +70,7 @@ ERROR: number-expected ;
?scan-token parse-word ;
: scan-syntax-word ( -- word )
?scan-token "\\" ?head drop parse-word ;
?scan-token parse-word ;
: scan-number ( -- number )
?scan-token parse-number ;
@ -90,15 +90,6 @@ ERROR: invalid-word-name string ;
: scan-new-word ( -- word )
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 ;
: (execute-parsing) ( accum word -- accum )

View File

@ -124,7 +124,7 @@ IN: bootstrap.syntax
"deprecated" [ last-word make-deprecated ] define-core-syntax
"SYNTAX:" [
scan-new-syntax-word
scan-new-word
mark-top-level-syntax
parse-definition define-syntax
] define-core-syntax
@ -153,7 +153,7 @@ IN: bootstrap.syntax
] define-core-syntax
"ALIAS:" [
scan-new-syntax-word scan-syntax-word define-alias
scan-new-word scan-word define-alias
] define-core-syntax
"CONSTANT:" [