Expand description
Conversions between SyntaxNode and tt::TokenTree.
Modules§
- dummy_test_ span_ utils 
- Dummy things for testing where spans don’t matter.
- prettify_macro_ expansion 
- Utilities for formatting macro expanded nodes until we get a proper formatter.
Enums§
- DocCommentDesugar Mode 
- Doc comment desugaring differs between mbe and proc-macros.
- TopEntryPoint 
- Parse the whole of the input as a given syntactic construct.
Traits§
Functions§
- desugar_doc_ comment_ text 
- 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
- parse_to_ token_ tree 
- Convert a string to a TokenTree. The spans of the subtree will be anchored to the provided anchor with the given context.
- parse_to_ token_ tree_ static_ span 
- Convert a string to a TokenTree. The passed span will be used for all spans of the produced subtree.
- syntax_node_ to_ token_ tree 
- Converts a syntax tree to a tt::Subtreeusing the provided span map to populate the subtree’s spans.
- syntax_node_ to_ token_ tree_ modified 
- 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.
- to_parser_ input 
- token_tree_ to_ syntax_ node 
- Converts a tt::Subtreeback to aSyntaxNode. The producedSpanMapcontains a mapping from the syntax nodes offsets to the subtree’s spans.