ImplicitSymbol

parsley.token.symbol.ImplicitSymbol
abstract class ImplicitSymbol

This class provides implicit functionality to promote string literals into tokens.

Attributes

Since:

4.0.0

Source:
Symbol.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Concise view

Implicits

Implicits

implicit def implicitSymbol(s: String): Parsley[Unit]

This method takes the given string and turns it into a parser for that token.

This method takes the given string and turns it into a parser for that token.

This method can be brought into scope in a parser to allow string literals to naturally serve as tokens. In particular, it will correctly deal with known keywords and operators, and otherwise handle other strings at face-value.

Attributes

Since:

4.0.0

Note:

it is assumed that the token's content is irrelevant, since it is already known what it is, so Unit is returned.

Source:
Symbol.scala