From d52e0a892ca75407cd3547311c07454d0aedd6be Mon Sep 17 00:00:00 2001 From: IllusionMan1212 Date: Sun, 13 Oct 2024 00:01:41 +0200 Subject: [PATCH] fix(core:{odin,c}/tokenizer): Don't error on valid \uE000 codepoint --- core/c/frontend/tokenizer/tokenizer.odin | 2 +- core/odin/tokenizer/tokenizer.odin | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/c/frontend/tokenizer/tokenizer.odin b/core/c/frontend/tokenizer/tokenizer.odin index 2415e06a0..558077717 100644 --- a/core/c/frontend/tokenizer/tokenizer.odin +++ b/core/c/frontend/tokenizer/tokenizer.odin @@ -291,7 +291,7 @@ scan_escape :: proc(t: ^Tokenizer) -> bool { n -= 1 } - if x > max || 0xd800 <= x && x <= 0xe000 { + if x > max || 0xd800 <= x && x <= 0xdfff { error_offset(t, offset, "escape sequence is an invalid Unicode code point") return false } diff --git a/core/odin/tokenizer/tokenizer.odin b/core/odin/tokenizer/tokenizer.odin index c3a30581c..d4da82c56 100644 --- a/core/odin/tokenizer/tokenizer.odin +++ b/core/odin/tokenizer/tokenizer.odin @@ -331,7 +331,7 @@ scan_escape :: proc(t: ^Tokenizer) -> bool { n -= 1 } - if x > max || 0xd800 <= x && x <= 0xe000 { + if x > max || 0xd800 <= x && x <= 0xdfff { error(t, offset, "escape sequence is an invalid Unicode code point") return false }