Re-exports§
pub use expr::Expr;pub use expr::HasArgList;pub use nodes::Arg;pub use nodes::ArgList;pub use nodes::AssignmentExpr;pub use nodes::BinaryExpr;pub use nodes::BlockExpr;pub use nodes::CallExpr;pub use nodes::ForExpr;pub use nodes::ForExprParts;pub use nodes::Formal;pub use nodes::FunctionExpr;pub use nodes::IfExpr;pub use nodes::NamespaceAccess;pub use nodes::Param;pub use nodes::ParenExpr;pub use nodes::RepeatExpr;pub use nodes::Root;pub use nodes::RoxygenBlock;pub use nodes::RoxygenParagraph;pub use nodes::RoxygenSection;pub use nodes::RoxygenTag;pub use nodes::Subset2Expr;pub use nodes::SubsetExpr;pub use nodes::UnaryExpr;pub use nodes::WhileExpr;pub use nodes::WhileExprParts;pub use tokens::AstToken;pub use tokens::Comment;pub use tokens::ComplexLit;pub use tokens::FloatLit;pub use tokens::Ident;pub use tokens::IntLit;pub use tokens::RConstant;pub use tokens::StringLit;pub use tokens::token_name;
Modules§
- expr
- The
Exprunion over “any R expression”, and theHasArgListshared trait for the argument-bearing nodes. - kinds
- Shared
SyntaxKindpredicates for the AST-wrapper layer and its consumers. Kept in one place so node/token accessors and the linter’s matchers agree on what counts as a binary operator, a unary operator, or trivia. - nodes
- support
- tokens
- Typed AST wrappers over CST tokens (leaves), mirroring rowan’s
AstNodefor nodes. rowan 0.16 ships onlyAstNode; arity defines its ownAstToken(as rust-analyzer does).
Structs§
- AstChildren
- AstPtr
- Like
SyntaxNodePtr, but remembers the type of node. - Syntax
Node Ptr - A “pointer” to a
SyntaxNode, via location in the source code.
Traits§
- AstNode
- The main trait to go from untyped
SyntaxNodeto a typed AST. The conversion itself has zero runtime cost: AST and syntax nodes have exactly the same representation: a pointer to the tree root and a pointer to the node itself.