This class describes the valid escape sequences within character and string literals.
This allows for the definition of different escape sequences as direct literals, mapping from single or multiple characters to specific values, numeric escape sequences with different bases, as well as supporting zero-width escapes and line continuations via string gaps.
Attributes
- binaryEscape
$numericEscape 2.
- decimalEscape
$numericEscape 10.
- emptyEscape
if one should exist, the character which has no effect on the string but can be used to disambiguate other escape sequences: in Haskell this would be
\&
.- escBegin
the character that starts an escape sequence, very often this is
'\\'
.- gapsSupported
specifies whether or not string gaps are supported: this is where whitespace can be injected between two
escBegin
characters and this will all be ignored in the final string, such that"hello \ \world"
is"hello world"
.- hexadecimalEscape
$numericEscape 16.
- literals
the characters that can be directly escaped, but still represent themselves, for instance
'"'
, or'\\'
.- multiMap
the possible multi-character escape sequences and the (full UTF-16) character they map to.
- octalEscape
$numericEscape 8.
- singleMap
the possible single-character escape sequences and the (full UTF-16) character they map to, for instance
'n' -> 0xa
.- Companion:
- object
- Source:
- TextDesc.scala
- Graph
- Supertypes