Browse Source

Merge pull request #4370 from IllusionMan1212/allow-e000-codepoint

fix(core:{odin,c}/tokenizer): Don't error on valid \uE000 codepoint
gingerBill 9 months ago
parent
commit
b6cbdf7c54
2 changed files with 2 additions and 2 deletions
  1. 1 1
      core/c/frontend/tokenizer/tokenizer.odin
  2. 1 1
      core/odin/tokenizer/tokenizer.odin

+ 1 - 1
core/c/frontend/tokenizer/tokenizer.odin

@@ -291,7 +291,7 @@ scan_escape :: proc(t: ^Tokenizer) -> bool {
 		n -= 1
 		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")
 		error_offset(t, offset, "escape sequence is an invalid Unicode code point")
 		return false
 		return false
 	}
 	}

+ 1 - 1
core/odin/tokenizer/tokenizer.odin

@@ -331,7 +331,7 @@ scan_escape :: proc(t: ^Tokenizer) -> bool {
 		n -= 1
 		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")
 		error(t, offset, "escape sequence is an invalid Unicode code point")
 		return false
 		return false
 	}
 	}