Macro biome_js_syntax::map_syntax_node
source · macro_rules! map_syntax_node {
($ node : expr , $ pattern : pat => $ body : expr) => { ... };
}
Expand description
Reconstruct an AstNode from a SyntaxNode
This macros performs a match over the kind of the provided biome_rowan::SyntaxNode and constructs the appropriate AstNode type for it, then execute the provided expression over it.
§Examples
ⓘ
map_syntax_node!(syntax_node, node => node.format())