Module config

Source
Expand description

This module implements code to tokenize and parse CFG source text, and query configurations.

Structs§

BinaryNode
This represents a binary node, typically used in expressions such as A + B.
Config
Represents a CFG configuration.
Location
This represents a line and column location in CFG source.
Parser
This implements the low-level parser of CFG source text.
Token
This represents a lexical token in CFG source.
UnaryNode
This represents a unary node, typically used in expressions such as -A.

Enums§

ASTValue
This represents AST nodes corresponding to fragments of CFG source.
ConfigError
This is the type of error returned from the high-level API for CFG configurations.
RecognizerError
This represents the low-level errors which can occur when parsing CFG source. They all include the source location where the error was detected.
ScalarValue
This represents a scalar value corresponding to a token.
TokenKind
This represents the kind of token. A deliberate choice was made to separate this from the ScalarValue enumeration to keep the token kind as just a simple enumeration, as in other language implementations.
Value
This represents a value in a configuration.