Module syntex_syntax::ast
[−]
[src]
Reexports
pub use self::StructFieldKind::*; |
pub use self::TyParamBound::*; |
pub use self::UnsafeSource::*; |
pub use self::ViewPath_::*; |
pub use self::PathParameters::*; |
Structs
| AngleBracketedParameterData |
A path like |
| Arg |
represents an argument in a function header |
| Arm |
represents one arm of a 'match' |
| AttrId | |
| Attribute_ |
Doc-comments are promoted to attributes that have is_sugared_doc = true |
| BareFnTy | |
| Block | |
| Crate | |
| Delimited |
A delimited sequence of token trees |
| EnumDef | |
| Expr |
An expression |
| Field | |
| FieldPat |
A single field in a struct pattern |
| FnDecl |
Represents the header (not the body) of a function declaration |
| ForeignItem | |
| ForeignMod | |
| Generics |
Represents lifetimes and type parameters attached to a declaration of a function, enum, trait, etc. |
| Ident |
An identifier contains a Name (index into the interner table) and a SyntaxContext to track renaming and macro expansion per Flatt et al., "Macros That Work Together" |
| ImplItem | |
| InlineAsm | |
| InlineAsmOutput | |
| Item |
An item |
| Lifetime | |
| LifetimeDef |
A lifetime definition, eg |
| Local |
Local represents a |
| Mac_ |
Represents a macro invocation. The Path indicates which macro is being invoked, and the vector of token-trees contains the source of the macro invocation. |
| MacroDef |
A macro definition, in this crate or imported from another. |
| MethodSig |
Represents a method's signature in a trait declaration, or in an implementation. |
| Mod | |
| MutTy | |
| Name |
A name is a part of an identifier, representing a string or gensym. It's the result of interning. |
| ParenthesizedParameterData |
A path like |
| Pat | |
| Path |
A "Path" is essentially Rust's notion of a name; for instance: std::cmp::PartialEq . It's represented as a sequence of identifiers, along with a bunch of supporting information. |
| PathSegment |
A segment of a path: an identifier, an optional lifetime, and a set of types. |
| PolyTraitRef | |
| QSelf |
The explicit Self type in a "qualified path". The actual
path, including the trait and the associated item, is stored
separately. |
| SequenceRepetition |
A sequence of token trees |
| StructField_ | |
| SyntaxContext |
A SyntaxContext represents a chain of macro-expandings and renamings. Each macro expansion corresponds to a fresh u32. This u32 is a reference to a table stored in thread-local storage. The special value EMPTY_CTXT is used to indicate an empty syntax context. |
| TraitItem |
Represents a method declaration in a trait declaration, possibly including a default implementation. A trait method is either required (meaning it doesn't have an implementation, just a signature) or provided (meaning it has a default implementation). |
| TraitRef |
TraitRef's appear in impls. |
| Ty | |
| TyParam | |
| TypeBinding | |
| Variant_ | |
| WhereBoundPredicate |
A type bound, e.g. |
| WhereClause |
A |
| WhereEqPredicate |
An equality predicate (unsupported), e.g. |
| WhereRegionPredicate |
A lifetime predicate, e.g. |
Enums
| AsmDialect | |
| AttrStyle |
Distinguishes between Attributes that decorate items and Attributes that are contained as statements within items. These two cases need to be distinguished for pretty-printing. |
| BinOpKind | |
| BindingMode | |
| BlockCheckMode | |
| CaptureBy |
A capture clause |
| Constness | |
| DeclKind | |
| ExprKind | |
| FloatTy | |
| ForeignItemKind |
An item within an |
| FunctionRetTy | |
| ImplItemKind | |
| ImplPolarity | |
| IntTy | |
| ItemKind | |
| KleeneOp |
A Kleene-style repetition operator for token sequences. |
| LitIntType | |
| LitKind | |
| MacStmtStyle | |
| MetaItemKind | |
| Mutability | |
| PatKind | |
| PathListItemKind | |
| PathParameters | |
| SelfKind |
Represents the kind of 'self' associated with a method |
| StmtKind | |
| StrStyle | |
| StructFieldKind | |
| TokenTree |
When the main rust parser encounters a syntax-extension invocation, it parses the arguments to the invocation as a token-tree. This is a very loose structure, such that all sorts of different AST-fragments can be passed to syntax extensions using a uniform type. |
| TraitBoundModifier |
A modifier on a bound, currently this is only used for |
| TraitItemKind | |
| TyKind |
The different kinds of types recognized by the compiler |
| TyParamBound |
The AST represents all type param bounds as types. typeck::collect::compute_bounds matches these against the "special" built-in traits (see middle::lang_items) and detects Copy, Send and Sync. |
| UintTy | |
| UnOp | |
| UnsafeSource | |
| Unsafety | |
| VariantData |
Fields and Ids of enum variants and structs |
| ViewPath_ | |
| Visibility | |
| WherePredicate |
A single predicate in a |
Constants
| CRATE_NODE_ID |
Node id used to represent the root of the crate. |
| DUMMY_NODE_ID |
When parsing and doing expansions, we initially give all AST nodes this AST node value. Then later, in the renumber pass, we renumber them to have small, positive ids. |
| EMPTY_CTXT |
Traits
| NodeIdAssigner |
Type Definitions
| Attribute |
Meta-data associated with an item |
| BinOp | |
| CrateConfig |
The set of MetaItems that define the compilation environment of the crate, used to drive conditional compilation |
| CrateNum | |
| Decl | |
| ExplicitSelf | |
| Lit |
A literal |
| Mac | |
| MetaItem | |
| Mrk |
A mark represents a unique id associated with a macro expansion |
| NodeId | |
| PathListItem | |
| SpannedIdent | |
| Stmt |
A statement |
| StructField | |
| TyParamBounds | |
| Variant | |
| ViewPath |