Skip to main content

rex_ast/
lib.rs

1#![forbid(unsafe_code)]
2#![cfg_attr(not(test), deny(clippy::unwrap_used, clippy::expect_used))]
3
4//! AST data structures for Rex.
5//!
6//! This crate is intentionally “dumb data” first: keep it easy to read, print,
7//! and transform. Anything with complicated control flow generally belongs in a
8//! later phase (parser, type checker, engine).
9
10mod ast;
11mod id;
12mod macros;
13mod span;
14mod symbol;
15
16pub use ast::{
17    ClassDecl, ClassMethodSig, CompilationUnit, Decl, DeclareFnDecl, Expr, FnDecl, ImportClause,
18    ImportDecl, ImportItem, ImportPath, InstanceDecl, InstanceMethodImpl, NameRef, Pattern, Scope,
19    TypeConstraint, TypeDecl, TypeExpr, TypeVariant, Var,
20};
21pub use id::Id;
22pub use span::{Position, Span, Spanned};
23pub use symbol::Symbol;