Crate lang_util[][src]

lang-util is a crate that implements utilities to parse and represent syntax trees using lalrpop and logos.

This crate is tailored for use in the glsl-lang crate, but you may use its utilities for implementing your own language parsers:

  • error: parsing error reporting module, with user-readable location information
  • node: AST node structure and display
  • position: utilities for working with positions in strings

Re-exports

pub use error::Token;

Modules

error

Error type definitions

node

AST type definitions

position

Input position representation types

Macros

assert_ceq

Replacement for assert_eq but using NodeContentEq instead of PartialEq

Traits

NodeContent

Trait for AST node contents.

Derive Macros

NodeContent

Mark a type as representing data in an AST node

Token

Derive lang_util::error::Token for an enum usable with Logos