Add some error checking to CHAR:
parent
c2c07f8b22
commit
51787c2022
|
@ -498,3 +498,5 @@ DEFER: blah
|
||||||
[ error>> error>> def>> \ blah eq? ] must-fail-with
|
[ error>> error>> def>> \ blah eq? ] must-fail-with
|
||||||
|
|
||||||
[ ] [ f lexer set f file set "Hello world" note. ] unit-test
|
[ ] [ f lexer set f file set "Hello world" note. ] unit-test
|
||||||
|
|
||||||
|
[ "CHAR: \\u9999999999999" eval ] must-fail
|
||||||
|
|
|
@ -62,7 +62,7 @@ IN: bootstrap.syntax
|
||||||
"CHAR:" [
|
"CHAR:" [
|
||||||
scan {
|
scan {
|
||||||
{ [ dup length 1 = ] [ first ] }
|
{ [ dup length 1 = ] [ first ] }
|
||||||
{ [ "\\" ?head ] [ next-escape drop ] }
|
{ [ "\\" ?head ] [ next-escape >string "" assert= ] }
|
||||||
[ name>char-hook get call ]
|
[ name>char-hook get call ]
|
||||||
} cond parsed
|
} cond parsed
|
||||||
] define-syntax
|
] define-syntax
|
||||||
|
|
Loading…
Reference in New Issue