Package com.github.adriantodt.tartar.api.lexer

Types

Lexer
Link copied to clipboard
common
interface Lexer<T>

Reads characters from a Source and outputs tokens.

LexerContext
Link copied to clipboard
common
interface LexerContext<T>

A lexing context, created by a Lexer.parse call, which exposes an interface for advanced lexing.

Section
Link copied to clipboard
common
data class Section(source: Source, index: Int, length: Int)

Represents a span of characters.

Sectional
Link copied to clipboard
common
interface Sectional

Indicates that a specified object has a section assigned to it.

Source
Link copied to clipboard
common
data class Source(content: String, name: String, path: String)

A source of text to lexers.

StringReader
Link copied to clipboard
common
class StringReader(s: String)

Portable implementation of a character stream whose source is a string.

common (non-jvm)
class StringReader(s: String)

Portable (non-jvm) implementation of a character stream whose source is a string.

typealias StringReader = StringReader

Functions

classpath
Link copied to clipboard
fun Source.Companion.classpath(lazyName: () -> String): Source

Creates a source from the classpath.