[−][src]Crate syn_rsx
syn-powered parser for JSX-like TokenStreams. The parsed result is a
nested Node structure, similar to the browser DOM. The node_value is
an syn::Expr.
use syn_rsx::parse2; use quote::quote; let tokens = quote! { <div> <div>"hello"</div> <world /> </div> }; let nodes = parse2(tokens, None).unwrap(); assert_eq!(nodes[0].child_nodes.len(), 2); assert_eq!(nodes[0].child_nodes[1].node_name, "world");
Structs
| Node | Node in the tree |
| Parser | RSX Parser |
| ParserConfig | Configures the |
Enums
| NodeType | Type of the Node |
Functions
| parse | Parse the given |
| parse2 | Parse the given |