Expand description
#[deftly(...)] meta attributes
§Used meta checking
Most of this file is concerned with generating
accurate and useful messages
when a driver is decorated with #[deftly(...)] attributes
which are not used by any template.
We distinguish “used” metas from “recognised” ones.
“Used” ones are those actually tested, and used,
during the dynamic expansion of the template.
They are recorded in the PreprocessedMetas,
which contains a Cell for each supplied node.
“Recognised” ones are those which appear anywhere in the template.
These are represented in a data structure [``Recognised]. This is calculated by scanning the template, using the FindRecogMetas` trait.
Both of these sets are threaded through
the ACCUM data in successive template expansions;
in the final call (EngineFinalInput),
they are combined together,
and the driver’s metas are checked against them.
Re-exports§
pub use FoundNearbyNodeKind as FNNK;pub use FoundNodeKind as FNK;
Macros§
Structs§
- Accum
- Information for meta checking, found in accumulation
- Borrowed
Desig 🔒 - Desig
- Meta designator eg
fmeta(foo(bar)) - Display
AsIf 🔒Specified Displays as a#[deftly(...)]as the user might write it- Found
Nearby Node - Information about a nearby meta node we found
- Found
Node - Node in tree structure found in driver
#[deftly(some(thing))] - IsUsed
- Label
(foo(bar))in egfmeta(foo(bar))- Meta
Unsupported - newtype to avoid coherence - it doesn’t impl
Parse + ToTokens - Preprocessed
Tree - An
#[deftly()]attribute, or a sub-tree within one - Preprocessed
Value List - A part like
(foo,bar(baz),zonk="value") - Recognised
- Scope
Iter - An iterator over the variants of Scope
- Subst
AsSupported - Subst
Meta - Supplied
Scope Iter - An iterator over the variants of SuppliedScope
- Usage
Info - Usage
Mode Iter - An iterator over the variants of UsageMode
- Used
Checker 🔒 - Used
Group - One lot of used metas in accumulation - argument to a
_meta_usedaccum
Enums§
- Check
Used - Something representing possibly checking that meta attributes are used
- Found
Nearby Node Kind - How the nearby node relates to the one we were looking for
- Found
Node Kind - Node in tree structure found in driver
#[deftly(some(thing))] - Preprocessed
Value - Content of a meta attribute
- Scope
- Indicates one of
fmeta,vmetaortmeta - SubstAs
- Supplied
Scope - Scope of a supplied meta (
#[deftly(...)]) attribute - Usage
Mode
Traits§
- Find
Recog Metas - Subst
AsSupport Status - Implemented for syn types supported in this build, and
MetaUnsupported
Functions§
- metavalue_
lit_ as - Convert a literal found in a meta item into
T - metavalue_
litstr 🔒 - Obtain the
LiStrfrom a meta node value (ie, aLit) - metavalue_
spans 🔒 - unrecognised_
error 🔒
Type Aliases§
- Preprocessed
Metas #[deftly(...)]helper attributes- Usage
- Value
Expr - Value
Items