Expand description
Conversions between SyntaxNode and tt::TokenTree.
Modules§
- Dummy things for testing where spans don’t matter.
- Utilities for formatting macro expanded nodes until we get a proper formatter.
Enums§
- Doc comment desugaring differs between mbe and proc-macros.
- Parse the whole of the input as a given syntactic construct.
Traits§
Functions§
- Returns the textual content of a doc comment block as a quoted string That is, strips leading
///(or/**, etc) and strips the ending*/And then quote the string, which is needed to convert tott::Literal - Convert a string to a
TokenTree. The spans of the subtree will be anchored to the provided anchor with the given context. - Convert a string to a
TokenTree. The passed span will be used for all spans of the produced subtree. - Converts a syntax tree to a
tt::Subtreeusing the provided span map to populate the subtree’s spans. - Converts a syntax tree to a
tt::Subtreeusing the provided span map to populate the subtree’s spans. Additionally using the append and remove parameters, the additional tokens can be injected or hidden from the output. - Converts a
tt::Subtreeback to aSyntaxNode. The producedSpanMapcontains a mapping from the syntax nodes offsets to the subtree’s spans.