Skip to main content

Crate microcad_lang_parse

Crate microcad_lang_parse 

Source
Expand description

Syntax definitions and parser for µcad source code.

This module includes the components to parse µcad source code into a stream of tokens or abstract syntax tree.

  • Transform source code into a stream of tokens with lex
  • Create an abstract syntax tree from the list of tokens with parse

Modules§

ast
Abstract syntax tree for µcad files
parsers
Chumsky parser functions for µcad syntax elements
token
Tokens

Macros§

impl_parser
implement a parser for a specific AST node type.

Structs§

ParseError
An error from building the abstract syntax tree
ParseErrors
Parse error collection.

Enums§

ParseContext
Context for parsing.

Traits§

Parse
Parse trait.

Functions§

lex
Tokenize a µcad source string into an iterator of tokens.
parse
API to parse directly from a string