Class UnicodeEscapeOrError
java.lang.Object
org.ek9lang.compiler.phase1.UnicodeEscapeOrError
- All Implemented Interfaces:
Consumer<EK9Parser.StringLitContext>
A backslash-u in a String literal must be followed by exactly four hex digits (E07903). The lexer only ever took
backslash-u plus four ASCII hex digits as an escape, but the decoder re-read the text with
parseInt(hex, 16),
which also takes a sign and any Unicode digit: backslash-u "+041" became 'A' and backslash-u "-001" U+FFFF
(front-end audit FE73). Steve: a new code, so a malformed escape is named for what it is. Checked in a double-quoted
String and in the text of a backtick String; not in a directive's String, which is test metadata.
(No backslash-u appears literally in this comment: javac decodes unicode escapes even in comments.)
-
Constructor Details
-
UnicodeEscapeOrError
UnicodeEscapeOrError(ErrorListener errorListener)
-
-
Method Details
-
accept
- Specified by:
acceptin interfaceConsumer<EK9Parser.StringLitContext>
-