Package-level declarations

Types

Link copied to clipboard

A map from argument labels to Values.

Link copied to clipboard
interface ProtocolParser<out P : Protocol>

A parser for protocols of type P.

Link copied to clipboard

Maintains metadata (for example, file path) about an input stream and gives access to its contents.

Link copied to clipboard
data class SourcePosition(sourceFile: SourceFile, val offset: Int) : Comparable<SourcePosition>

Represents a position in a source file. Positions correspond to spaces between characters rather than characters themselves.

Link copied to clipboard
data class SourceRange(val start: SourcePosition, val end: SourcePosition)

Denotes a nonempty set of consecutive characters in a source file. Empty ranges are not allowed, since there is no column number that corresponds to a single position.

Functions

Link copied to clipboard
fun SourceFile.parse(protocolParsers: Map<ProtocolName, ProtocolParser<Protocol>> = defaultProtocolParsers): ProgramNode

Parses this source file and returns the AST.

fun String.parse(path: String = "<string>", protocolParsers: Map<ProtocolName, ProtocolParser<Protocol>> = defaultProtocolParsers): ProgramNode

Parses this string and returns the AST.

Link copied to clipboard

Parses this source file as a security label.

fun String.parseLabel(path: String = "<string>"): LabelExpression

Parses this string as a security label.

Properties

Link copied to clipboard