Module ast

Module ast 

Source

Structs§

AnnotationList
Annotations are tags that modify a specific sort or more often constructor.
CharacterClass
A character class represent a selection of terminal characters. This is similar to Regex character classes. Character classes can be inverted by starting them with a ^. For example, [^\n] means it matches any character that is not a newline.
DocComment
A documentation comment (doc comment) is always associated with a sort or constructor. It documents what it does. Doc comments will be interpreted and will be put on the generated types during codegen.
Identifier
An identifier is any name of a constructor or sort, and is used in various places. Identifiers always start with a letter (capital or not) or an underscore, and can be followed by letters or numbers. This is very similar to how variables in most major programming languages work.
Meta
Other top-level constructs that are not sorts
Number
Program

Enums§

Annotation
CharacterClassItem
Constructor
A [sort] consists of constructors. A sort will try each of the constructors from top to bottom, and use the first one that successfully parses the input string.
DelimitedBound
A delimited expression can be repeated just like normal repetition expressions. To denote this, you can use a delimitation bound.
EscapeClosingBracket
Expression
With expressions, you can give the syntax rules of a single constructor. Expressions can be nested and combined.
Layout
Sort
A sort is a group of constructors. See [constructor] for more details.
SortOrMeta
String
StringChar

Constants§

PARSER

Type Aliases§

AST_ROOT