ElmLexer

io.eleven19.krueger.lexer.ElmLexer
object ElmLexer

Provides tokenisation primitives for the Elm language dialect.

Elm is indentation-sensitive, so newlines are structurally significant. The lexer handles identifiers (lower and upper), operators, keywords, numeric and string literals, and whitespace management.

Attributes

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

Members list

Value members

Concrete methods

def braces[A](p: Parsley[A]): Parsley[A]

Parse content wrapped in curly braces.

Parse content wrapped in curly braces.

Attributes

Source
ElmLexer.scala
def brackets[A](p: Parsley[A]): Parsley[A]

Parse content wrapped in square brackets.

Parse content wrapped in square brackets.

Attributes

Source
ElmLexer.scala
def commaSep[A](p: Parsley[A]): Parsley[List[A]]

Parse a comma-separated list.

Parse a comma-separated list.

Attributes

Source
ElmLexer.scala
def commaSep1[A](p: Parsley[A]): Parsley[List[A]]

Parse a comma-separated list with at least one element.

Parse a comma-separated list with at least one element.

Attributes

Source
ElmLexer.scala
def fully[A](p: Parsley[A]): Parsley[A]

Fully wraps a parser: skips leading whitespace and asserts end-of-input.

Fully wraps a parser: skips leading whitespace and asserts end-of-input.

Attributes

Source
ElmLexer.scala
def keyword(kw: String): Parsley[Unit]

Parse a specific keyword.

Parse a specific keyword.

Attributes

Source
ElmLexer.scala
def parens[A](p: Parsley[A]): Parsley[A]

Parse content wrapped in parentheses.

Parse content wrapped in parentheses.

Attributes

Source
ElmLexer.scala
def symbol(sym: String): Parsley[Unit]

Parse a specific symbol/operator.

Parse a specific symbol/operator.

Attributes

Source
ElmLexer.scala

Concrete fields

val charLiteral: Parsley[Char]

A character literal.

A character literal.

Attributes

Source
ElmLexer.scala
val eolOrEof: Parsley[Unit]

Matches end-of-line or end-of-input.

Matches end-of-line or end-of-input.

Attributes

Source
ElmLexer.scala
val floatLiteral: Parsley[Double]

A floating-point literal.

A floating-point literal.

Attributes

Source
ElmLexer.scala
val hspace: Parsley[Char]

Matches a single space or tab (horizontal whitespace).

Matches a single space or tab (horizontal whitespace).

Attributes

Source
ElmLexer.scala
val hspaces: Parsley[Unit]

Skips zero or more horizontal whitespace characters.

Skips zero or more horizontal whitespace characters.

Attributes

Source
ElmLexer.scala
val identifier: Parsley[String]

Any identifier (lower or upper).

Any identifier (lower or upper).

Attributes

Source
ElmLexer.scala
val intLiteral: Parsley[Long]

An integer literal.

An integer literal.

Attributes

Source
ElmLexer.scala
val keywords: Set[String]

Elm reserved keywords. Exposed so tooling (editor tokenizers, doc generators) can stay in sync with the parser's notion of "keyword" without duplicating the list.

Elm reserved keywords. Exposed so tooling (editor tokenizers, doc generators) can stay in sync with the parser's notion of "keyword" without duplicating the list.

Attributes

Source
ElmLexer.scala
val lowerIdentifier: Parsley[String]

A lower-case identifier: starts with a lowercase letter or underscore.

A lower-case identifier: starts with a lowercase letter or underscore.

Attributes

Source
ElmLexer.scala
val newline: Parsley[Char]

Matches a newline character.

Matches a newline character.

Attributes

Source
ElmLexer.scala
val operator: Parsley[String]

A user-defined operator.

A user-defined operator.

Attributes

Source
ElmLexer.scala
val operators: Set[String]

Elm hard operators. Exposed so tooling (editor tokenizers, doc generators) can stay in sync with the parser's notion of "operator" without duplicating the list.

Elm hard operators. Exposed so tooling (editor tokenizers, doc generators) can stay in sync with the parser's notion of "operator" without duplicating the list.

Attributes

Source
ElmLexer.scala
val stringLiteral: Parsley[String]

A string literal.

A string literal.

Attributes

Source
ElmLexer.scala
val upperIdentifier: Parsley[String]

An upper-case identifier: starts with an uppercase letter.

An upper-case identifier: starts with an uppercase letter.

Attributes

Source
ElmLexer.scala