Module syntax::ast
[−]
[src]
rustc_private
)Reexports
pub use self::TyParamBound::*; |
pub use self::UnsafeSource::*; |
pub use self::ViewPath_::*; |
pub use self::PathParameters::*; |
Structs
AngleBracketedParameterData |
[Unstable] A path like |
Arg |
[Unstable] represents an argument in a function header |
Arm |
[Unstable] represents one arm of a 'match' |
AttrId | [Unstable] |
Attribute_ |
[Unstable] Doc-comments are promoted to attributes that have is_sugared_doc = true |
BareFnTy | [Unstable] |
Block | [Unstable] |
Crate | [Unstable] |
Delimited |
[Unstable] A delimited sequence of token trees |
EnumDef | [Unstable] |
Expr |
[Unstable] An expression |
Field | [Unstable] |
FieldPat |
[Unstable] A single field in a struct pattern |
FnDecl |
[Unstable] Represents the header (not the body) of a function declaration |
ForeignItem | [Unstable] |
ForeignMod | [Unstable] |
Generics |
[Unstable] Represents lifetimes and type parameters attached to a declaration of a function, enum, trait, etc. |
Ident |
[Unstable] 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 | [Unstable] |
InlineAsm | [Unstable] |
InlineAsmOutput | [Unstable] |
Item |
[Unstable] An item |
Lifetime | [Unstable] |
LifetimeDef |
[Unstable] A lifetime definition, eg |
Local |
[Unstable] Local represents a |
Mac_ |
[Unstable] 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 |
[Unstable] A macro definition, in this crate or imported from another. |
MethodSig |
[Unstable] Represents a method's signature in a trait declaration, or in an implementation. |
Mod | [Unstable] |
MutTy | [Unstable] |
Name |
[Unstable] A name is a part of an identifier, representing a string or gensym. It's the result of interning. |
ParenthesizedParameterData |
[Unstable] A path like |
Pat | [Unstable] |
Path |
[Unstable] 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 |
[Unstable] A segment of a path: an identifier, an optional lifetime, and a set of types. |
PolyTraitRef | [Unstable] |
QSelf |
[Unstable] The explicit Self type in a "qualified path". The actual
path, including the trait and the associated item, is stored
separately. |
SequenceRepetition |
[Unstable] A sequence of token trees |
StructField | [Unstable] |
SyntaxContext |
[Unstable] 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 |
[Unstable] Represents an item declaration within a trait declaration, possibly including a default implementation. A trait item is either required (meaning it doesn't have an implementation, just a signature) or provided (meaning it has a default implementation). |
TraitRef |
[Unstable] TraitRef's appear in impls. |
Ty | [Unstable] |
TyParam | [Unstable] |
TypeBinding | [Unstable] |
Variant_ | [Unstable] |
WhereBoundPredicate |
[Unstable] A type bound, e.g. |
WhereClause |
[Unstable] A |
WhereEqPredicate |
[Unstable] An equality predicate (unsupported), e.g. |
WhereRegionPredicate |
[Unstable] A lifetime predicate, e.g. |
Enums
AsmDialect | [Unstable] |
AttrStyle |
[Unstable] 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 | [Unstable] |
BindingMode | [Unstable] |
BlockCheckMode | [Unstable] |
CaptureBy |
[Unstable] A capture clause |
Constness | [Unstable] |
DeclKind | [Unstable] |
Defaultness | [Unstable] |
ExprKind | [Unstable] |
FloatTy | [Unstable] |
ForeignItemKind |
[Unstable] An item within an |
FunctionRetTy | [Unstable] |
ImplItemKind | [Unstable] |
ImplPolarity | [Unstable] |
IntTy | [Unstable] |
ItemKind | [Unstable] |
KleeneOp |
[Unstable] A Kleene-style repetition operator for token sequences. |
LitIntType | [Unstable] |
LitKind | [Unstable] |
MacStmtStyle | [Unstable] |
MetaItemKind | [Unstable] |
Mutability | [Unstable] |
PatKind | [Unstable] |
PathListItemKind | [Unstable] |
PathParameters | [Unstable] |
RangeLimits |
[Unstable] Limit types of a range (inclusive or exclusive) |
SelfKind |
[Unstable] Represents the kind of 'self' associated with a method.
String representation of |
StmtKind | [Unstable] |
StrStyle | [Unstable] |
TokenTree |
[Unstable] 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 |
[Unstable] A modifier on a bound, currently this is only used for |
TraitItemKind | [Unstable] |
TyKind |
[Unstable] The different kinds of types recognized by the compiler |
TyParamBound |
[Unstable] 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 | [Unstable] |
UnOp | [Unstable] |
UnsafeSource | [Unstable] |
Unsafety | [Unstable] |
VariantData |
[Unstable] Fields and Ids of enum variants and structs |
ViewPath_ | [Unstable] |
Visibility | [Unstable] |
WherePredicate |
[Unstable] A single predicate in a |
Constants
CRATE_NODE_ID |
[Unstable] Node id used to represent the root of the crate. |
DUMMY_NODE_ID |
[Unstable] 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 | [Unstable] |
Traits
NodeIdAssigner | [Unstable] |
Type Definitions
Attribute |
[Unstable] Meta-data associated with an item |
BinOp | [Unstable] |
CrateConfig |
[Unstable] The set of MetaItems that define the compilation environment of the crate, used to drive conditional compilation |
CrateNum | [Unstable] |
Decl | [Unstable] |
ExplicitSelf | [Unstable] |
Lit |
[Unstable] A literal |
Mac | [Unstable] |
MetaItem | [Unstable] |
Mrk |
[Unstable] A mark represents a unique id associated with a macro expansion |
NodeId | [Unstable] |
PathListItem | [Unstable] |
SpannedIdent | [Unstable] |
Stmt |
[Unstable] A statement |
TyParamBounds | [Unstable] |
Variant | [Unstable] |
ViewPath | [Unstable] |