predicate

parsley.token.predicate$
object predicate

This module contains functionality to describe character predicates, which can be used to determine what characters are valid for different tokens.

Attributes

Since

4.0.0

Source
predicate.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
predicate.type

Members list

Type members

Classlikes

final case class Basic(predicate: Char => Boolean) extends CharPredicate

Basic character predicate, which reads regular Scala 16-bit characters.

Basic character predicate, which reads regular Scala 16-bit characters.

This predicate is only capable of recognising characters within the Basic Multilingual Plane.

Attributes

Since

4.0.0

Source
predicate.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
sealed abstract class CharPredicate

Base class for character predicates.

Base class for character predicates.

Attributes

Since

4.0.0

Source
predicate.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Basic
object NotRequired.type
class Unicode
case object NotRequired extends CharPredicate

Character predicate that never succeeds.

Character predicate that never succeeds.

Attributes

Since

4.0.0

Source
predicate.scala
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
final case class Unicode(predicate: Int => Boolean) extends CharPredicate

More generic character predicate, which reads any unicode codepoint.

More generic character predicate, which reads any unicode codepoint.

Full unicode characters can be up to 24-bits, which is handled by a 32-bit number on the JVM. This predicate can be used, therefore, to handle any single unicode codepoint: this excludes multi-codepoint characters like flags, or modified emojis.

In Scala, characters can be upcast to integers, so still can be used in the description of this predicate.

Attributes

Since

4.0.0

Source
predicate.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object implicits

This object provides implicit functionality for constructing CharPredicate values.

This object provides implicit functionality for constructing CharPredicate values.

Attributes

Since

4.1.0

Source
predicate.scala
Supertypes
class Object
trait Matchable
class Any
Self type
implicits.type