Class IsUnicodeEscapeAt
java.lang.Object
org.ek9lang.compiler.support.literals.IsUnicodeEscapeAt
- All Implemented Interfaces:
BiPredicate<String,Integer>
THE test for a unicode escape: a backslash, a 'u', then exactly four ASCII hex digits - the lexer's own
UnicodeEscape. Integer.parseInt(hex, 16) alone also takes a sign and any Unicode digit, so
backslash-u "+041" decoded to 'A' and backslash-u "-001" to U+FFFF (front-end audit FE73). Decode only when this
holds: both decoders (CharacterLiteralValue, DecodedEscapes) and phase 1's E07903 check ask it.
(Not written literally: javac decodes unicode escapes even in comments.)
The arguments are the literal's text and the offset of the backslash.
-
Constructor Details
-
IsUnicodeEscapeAt
public IsUnicodeEscapeAt()
-
-
Method Details
-
test
-