Module parser

Source
Expand description

Parses GeoScript’s tokens into a structured representation. Most of this module’s functionality is autogenerated through macros.

Structs§

AtLeastOne
Vector with at least one element.
DefinedType
A user-defined type.
DisplayProperties
Properties usually related to displaying things.
Displayed
Generic structure for statements that accept display options.
ExplicitIterator
$id(a, b, ...) - an explicit iterator with an id.
Exponentiation
A value being raised to a rational power v^exp.
ExprBinop
A parsed binary operator expression.
ExprCall
A parsed function call
ExprParenthesised
A parsed parenthesised expression
FieldIndex
A field access on a value value.field
FlagName
Defines the first half of a flag statement.
FlagSet
A set of flags.
FlagStatement
Defines a compiler flag or flagset.
ImplicitIterator
Punctuated expressions.
InputStream
The stream (peekable iterator) of input tokens
InvertedRuleOperator
An inverted rule operator.
LetStatement
let <something> = <something else>. Defines variables and possibly adds rules to them.
Maybe
A simple token option for use with FirstToken
PointCollectionConstructor
&(point, ...) - a point collection constructor allowing the creation of of a point collection from individual point expressions.
Property
A property
Punctuated
A utility struct for collections of parsed items with punctuators between them.
RationalExponent
A rational exponent of form (a/b), where a and b are integer tokens.
RawString
A raw string line !"Hello, World!". Does not parse any special characters.
RefStatement
?expr. Used for displaying and biases.
RuleStatement
lhs ruleop rhs. Defines a rule.
SimpleExpression
A parsed simple expression.
TokenOr
A simple token alternative for use with FirstToken
VariableDefinition
A single variable definition. Contains its name and optional display properties

Enums§

BinaryOperator
A binary operator, like +, -, * or /.
Exponent
An integer or a ratio. Used for exponents in exponentiation.
Expression
A parsed expression. Either an implicit iterator or a binary operation.
FlagValue
Defines the second half of a flag statement.
Name
A name (field, method or variable).
PredefinedRuleOperator
A builtin rule operator
PropertyValue
A property’s value
RuleOperator
A rule operator.
SimpleExpressionKind
A parsed simple expression.
Statement
A general statement. A rule, let or a ref
Type
A builtin type.

Traits§

CheckParses
Check if Self would parse given the tokens.
FromProperty
Trait for conversion of properties into actual types.
Parse
The main trait for parsing tokens.