parsley.token.descriptions.text

Members list

Type members

Classlikes

final case class EscapeDesc(escBegin: Char, literals: Set[Char], singleMap: Map[Char, Int], multiMap: Map[String, Int], decimalEscape: NumericEscape, hexadecimalEscape: NumericEscape, octalEscape: NumericEscape, binaryEscape: NumericEscape, emptyEscape: Option[Char], gapsSupported: Boolean)

This class describes the valid escape sequences within character and string literals.

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.

Value parameters

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.

Attributes

Companion
object
Source
TextDesc.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object EscapeDesc

This object contains default implementations of the EscapeDesc class, which align with different languages or styles.

This object contains default implementations of the EscapeDesc class, which align with different languages or styles.

Attributes

Since

4.0.0

Companion
class
Source
TextDesc.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
EscapeDesc.type
sealed abstract class NumberOfDigits

This class, and its subtypes, describe how many digits a numeric escape sequence is allowed.

This class, and its subtypes, describe how many digits a numeric escape sequence is allowed.

Attributes

Since

4.0.0

Companion
object
Source
TextDesc.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class AtMost
class Exactly
object Unbounded.type

This object contains the concrete subtypes of NumberOfDigits.

This object contains the concrete subtypes of NumberOfDigits.

Attributes

Since

4.0.0

Companion
class
Source
TextDesc.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
sealed abstract class NumericEscape

This class, and its subtypes, describe how numeric escape sequences should work for a specific base.

This class, and its subtypes, describe how numeric escape sequences should work for a specific base.

Attributes

Since

4.0.0

Companion
object
Source
TextDesc.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Illegal.type
class Supported
object NumericEscape

This object contains the concrete subtypes of NumericEscape.

This object contains the concrete subtypes of NumericEscape.

Attributes

Since

4.0.0

Companion
class
Source
TextDesc.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class TextDesc(escapeSequences: EscapeDesc, characterLiteralEnd: Char, stringEnds: Set[String], multiStringEnds: Set[String], graphicCharacter: CharPredicate)

This class describes how textual literals like strings and characters should be processed lexically.

This class describes how textual literals like strings and characters should be processed lexically.

Value parameters

characterLiteralEnd

what character starts and ends a character literal.

escapeSequences

the description of how escape sequences in literals.

graphicCharacter

what characters can be written verbatim into a character or string literal.

multiStringEnds

what sequences may begin and end a multi-line string literal.

stringEnds

what sequences may begin and end a string literal.

Attributes

Since

4.0.0

Companion
object
Source
TextDesc.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object TextDesc

This object contains any preconfigured text definitions.

This object contains any preconfigured text definitions.

Attributes

Since

4.0.0

Companion
class
Source
TextDesc.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
TextDesc.type