Class CharacterLiteralValue
java.lang.Object
org.ek9lang.compiler.support.literals.CharacterLiteralValue
- All Implemented Interfaces:
ToIntFunction<String>
THE value of an EK9 Character literal (quotes already stripped), as its Unicode code point (Steve, 2026-11-04: a
Character is one code point, so a literal above U+FFFF such as an emoji is one - it was an internal compiler error,
D94, while this returned a 16-bit char). Handles a single character, the standard escapes
(
\t, \n, ...), unicode escapes (A, judged by IsUnicodeEscapeAt) and octal
escapes (\101); throws IllegalArgumentException for anything else, a surrogate included (E07904
reports one in the source). The sibling for a whole String
is DecodedEscapes, which passes an unknown escape through rather than rejecting it.-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
CharacterLiteralValue
public CharacterLiteralValue()
-
-
Method Details
-
applyAsInt
- Specified by:
applyAsIntin interfaceToIntFunction<String>
-