Module tokenize

Source
Expand description

Tokenizing is the process of converting a tree-like structure into a single [TokenStream], usually representing an instantiated Bundle of the structure.

Structs§

TokenizeRelated
For a given RelationshipTarget component,

Functions§

is_event
Events are any attribute keys that start with on, and the value is not a string literal. This is to allow verbatim js handlers like onclick="some_js_function()".
tokenize_bundle
Create a TokenStream of a Bundle that represents the finalized tree of nodes for the given Entity, as opposed to the tokenized tree, see tokenize_bundle_tokens.
tokenize_bundle_tokens
Create a TokenStream of a Bundle that represents the tokenized tree of nodes for the given Entity, as opposed to the finalized tree,
tokenize_bundle_with_errors
Calls tokenize_bundle and appends any diagnostics tokens like rstml compile errors. Prefer this method for macros, and tokenize_bundle for codegen.
tokenize_combinator
Parse combinator string into a finalized InstanceRoot, see tokenize_bundle.
tokenize_combinator_tokens
Parse combinator string into a tokenized InstanceRoot, see tokenize_bundle_tokens.
tokenize_element_attributes
tokenize_event_handler
tokenize_related
If the entity has this RelationshipTarget, then map each child with map_child and return a related! TokenStream
tokenize_roots
tokenize_rstml
Parse rstml tokens into a finalized InstanceRoot, see tokenize_bundle.
tokenize_rstml_tokens
Parse rstml tokens into a tokenized InstanceRoot, see tokenize_bundle_tokens.
tokenize_rsx_directives
tokenize_rsx_nodes
tokenize_template
tokenize_web_directives
tokenize_web_nodes
unbounded_bundle
Uses Tuple if the number of items items can be represented as a tuple, otherwise use OnSpawn
unbounded_related
Uses related! if the number of related items can be represented as a tuple, otherwise use spawn_with