Skip to content

Commit daeb89c

Browse files
committed
Unicodeエスケープシーケンスの検証処理を削除
1 parent a80a323 commit daeb89c

1 file changed

Lines changed: 1 addition & 11 deletions

File tree

src/parser/scanner.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -359,18 +359,8 @@ export class Scanner implements ITokenStream {
359359
}
360360

361361
const value = decodeUnicodeEscapeSequence(rawValue);
362-
const [start, ...parts] = value;
363-
if (!identifierStart.test(start!)) {
364-
throw new AiScriptSyntaxError(`Invalid identifier: "${value}"`, pos);
365-
}
366-
for (const part of parts) {
367-
if (!identifierPart.test(part)) {
368-
throw new AiScriptSyntaxError(`Invalid identifier: "${value}"`, pos);
369-
}
370-
}
371-
372362
if (value !== rawValue) {
373-
throw new AiScriptSyntaxError(`Cannot use escape characters in identifier: "${rawValue}"`, pos);
363+
throw new AiScriptSyntaxError(`Invalid identifier: "${rawValue}"`, pos);
374364
}
375365

376366
// check word kind

0 commit comments

Comments
 (0)