Module parse

Module parse 

Source
Expand description

Declarative parsing types using unsynn

Structs§

AngleTokenTree
Parses either a TokenTree or <...> grouping
Attribute
(Outer) Attribute like #[derive(Debug)]
CfgAttrArg
Name argument: name = “custom”
ConstSig
const NAME: Type = value;
EnumSig
enum Name { … } block
EnumVariant
Single enum variant
ExternWithAbi
Extern with ABI string
FnSig
Complete function signature
Generics
Simple generics (treat as opaque for now)
ImplBlockSig
impl Type { … } block
InnerAttribute
Inner attribute like #![forbid(unsafe_code)]
KAsync
The “async” keyword
KCfgAttr
The “cfg_attr” keyword
KConst
The “const” keyword
KCrate
The “crate” keyword
KEnum
The “enum” keyword
KExtern
The “extern” keyword
KFn
The “fn” keyword
KFor
The “for” keyword
KImpl
The “impl” keyword
KMod
The “mod” keyword
KMut
The “mut” keyword
KName
The “name” keyword
KPath
The “path” keyword
KPub
The “pub” keyword
KSelf
The “self” keyword
KStatic
The “static” keyword
KStruct
The “struct” keyword
KSuper
The “super” keyword
KTrait
The “trait” keyword
KType
The “type” keyword
KUnsafe
The “unsafe” keyword
KWhere
The “where” keyword
ModuleContent
A complete module/file content
ModuleSig
mod name { … } block
NameArg
Name argument: name = “custom”
NamedParam
name: Type parameter
PathArg
Path argument: path = “docs”
PatternParam
Pattern parameter like (a, b): (i32, i32) or mut (x, y): Point
RestrictedVis
Restricted visibility like pub(crate)
ReturnTypeFn
Function return type: -> Type (stops at {)
ReturnTypeTrait
Trait return type: -> Type (stops at ;)
StaticSig
static NAME: Type = value;
StructField
Named struct field: pub name: Type
StructSig
struct Name { … } or struct Name;
SyncDocInner
Declarative syncdoc arguments structure
TraitMethodSig
Trait method signature (no body)
TraitSig
trait Name { … } block
TuplePattern
Tuple destructuring pattern: (a, b, c)
TypeAliasSig
type Alias = Type;
WhereClause
Represents a single predicate within a where clause.
WhereClausePredicate
Single where clause predicate: T: Trait
WhereClauses
Where clauses: where T: Trait, U: Send

Enums§

AnyAttribute
Either an inner or outer attribute
EnumVariantData
Enum variant data
ExternSpec
Extern specification with optional ABI
FnParam
Function parameter: name: Type or self variants
ModuleItem
Top-level item that can appear in a module
Pattern
Different types of patterns
PatternField
Field in a pattern
SelfParam
self, &self, &mut self, mut self
StructBody
Struct body variants
SyncDocArg
Single syncdoc argument
Visibility
Simple visibility parsing

Type Aliases§

And
The “&” operator
Eq
The “=” operator
VerbatimUntil
Parses tokens until C is found on the current token tree level.