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