Skip to main content

Crate vize_atelier_core

Crate vize_atelier_core 

Source
Expand description

§vize_atelier_core

Atelier Core - The core workshop for Vize. Vue template transforms and code generation.

§Name Origin

Atelier (/ˌætəlˈjeɪ/) is an artist’s workshop or studio where creative work is produced. The “core” atelier is the foundational workshop where the essential Vue template processing happens - transforming and code generation. vize_atelier_core provides the foundational infrastructure that all other Vize compilers build upon.

Re-exports§

pub use codegen::CodegenContext;
pub use codegen::CodegenResult;
pub use codegen::CodegenResultWithSections;
pub use codegen::CodegenSections;
pub use codegen::generate;
pub use codegen::generate_with_sections;
pub use lane::DirectiveTransform;
pub use lane::DirectiveTransformResult;
pub use lane::ExitFn;
pub use lane::NodeTransform;
pub use lane::ParentNode;
pub use lane::StructuralDirectiveTransform;
pub use lane::TransformContext;
pub use lane::transform;
pub use lane::transform_with_template_syntax_quirks;
pub use lane::transform_with_vue_parser_quirks;Deprecated
pub use runtime_helpers::RuntimeHelpers;
pub use runtime_helpers::get_vnode_block_helper;
pub use runtime_helpers::get_vnode_helper;
pub use steps::ChildrenType;
pub use steps::EventModifiers;
pub use steps::MemoInfo;
pub use steps::PropItem;
pub use steps::SlotInfo;
pub use steps::SlotOutletInfo;
pub use steps::StaticType;
pub use steps::TextCallExpression;
pub use steps::TextPart;
pub use steps::TransformPropsExpression;
pub use steps::TransformVNodeCall;
pub use steps::VModelModifiers;
pub use steps::build_element_codegen;
pub use steps::build_props;
pub use steps::build_text_call;
pub use steps::collect_slots;
pub use steps::condense_whitespace;
pub use steps::count_dynamic_children;
pub use steps::create_on_name;
pub use steps::generate_memo_check;
pub use steps::generate_v_memo_wrapper;
pub use steps::generate_v_once_wrapper;
pub use steps::get_bind_name;
pub use steps::get_bind_value;
pub use steps::get_event_name;
pub use steps::get_for_expression;
pub use steps::get_handler_expression;
pub use steps::get_if_condition;
pub use steps::get_memo_deps;
pub use steps::get_memo_exp;
pub use steps::get_model_event_prop;
pub use steps::get_slot_name;
pub use steps::get_slot_props_string;
pub use steps::get_static_type;
pub use steps::get_vmodel_helper;
pub use steps::has_attr_modifier;
pub use steps::has_camel_modifier;
pub use steps::has_dynamic_slots;
pub use steps::has_prop_modifier;
pub use steps::has_v_else;
pub use steps::has_v_else_if;
pub use steps::has_v_for;
pub use steps::has_v_if;
pub use steps::has_v_memo;
pub use steps::has_v_once;
pub use steps::has_v_slot;
pub use steps::hoist_static;
pub use steps::hoist_static;
pub use steps::is_condensible_whitespace;
pub use steps::is_dynamic_binding;
pub use steps::is_dynamic_event;
pub use steps::is_dynamic_slot;
pub use steps::is_simple_identifier;
pub use steps::is_static_node;
pub use steps::is_whitespace_only;
pub use steps::needs_guard;
pub use steps::parse_event_modifiers;
pub use steps::parse_for_expression;
pub use steps::parse_for_expression_with_options;
pub use steps::parse_model_modifiers;
pub use steps::prefix_identifiers_in_expression;
pub use steps::process_expression;
pub use steps::process_inline_handler;
pub use steps::process_v_bind;
pub use steps::process_v_for;
pub use steps::process_v_if;
pub use steps::process_v_memo;
pub use steps::process_v_on;
pub use steps::remove_for_directive;
pub use steps::remove_if_directive;
pub use steps::remove_v_memo;
pub use steps::remove_v_once;
pub use steps::resolve_element_type;
pub use steps::should_use_block;
pub use steps::strip_typescript_from_expression;
pub use steps::supports_v_model;
pub use steps::transform_slot_outlet;
pub use steps::transform_text_children;
pub use steps::transform_v_model;
pub use steps::transform_v_once;
pub use vize_armature as parser;

Modules§

codegen
VDOM code generation.
errors
Compiler error types and codes.
lane
Template transform lane for Vue template AST.
options
Compiler options.
runtime_helpers
Runtime helper registration and lookup.
steps
Transform steps for Vue template AST.
test_macros
Test helper macros for Vue compiler.
tokenizer
HTML tokenizer for Vue templates.

Macros§

assert_codegen
Assert codegen output against a full snapshot.
assert_parse
Parse and match against expected structure
assert_prop
Assert prop matches expected type
assert_transform
Assert transform results
compile
Compile template and return result (parse + transform + codegen)
get_directive
Quick directive extraction from element
get_element
Quick element extraction
parse_test
Parse a template and run assertions

Structs§

AllocBox
Re-export allocator types for convenience An owned pointer to a bump-allocated T value, that runs Drop implementations.
AllocVec
Re-export allocator types for convenience A contiguous growable array type, written Vec<'bump, T> but pronounced ‘vector’.
Allocator
Re-export allocator types for convenience Arena allocator for Vize.
ArrayExpression
Array expression
AssignmentExpression
Assignment expression
AttributeNode
Attribute node
BindingMetadata
Binding metadata from script setup
BlockStatement
Block statement
CacheExpression
Cache expression
CallExpression
Call expression
CodegenOptions
Codegen options
CommentNode
Comment node
CompilerError
Compiler error
CompilerOptions
Combined compiler options
CompoundExpressionNode
Compound expression node (mixed content)
ConditionalExpression
Conditional expression (ternary)
DirectiveArgumentNode
Single directive argument
DirectiveArguments
Directive arguments
DirectiveNode
Directive node (v-if, v-for, v-bind, etc.)
ElementNode
Element node
ForNode
For node (v-for)
ForParseResult
Parsed result for v-for expression
FunctionExpression
Function expression
IfBranchNode
If branch node (v-if, v-else-if, v-else)
IfNode
If node (v-if)
IfStatement
If statement (SSR)
ImportItem
Import item for code generation
InterpolationNode
Interpolation node ({{ expr }})
JsExpression
Placeholder for JavaScript expression AST from OXC
ObjectExpression
Object expression
Parser
Parser context for building AST
ParserOptions
Parser options
Position
Source position in the template
Property
Object property
ReturnStatement
Return statement
RootNode
Root AST node
SequenceExpression
Sequence expression
SimpleExpressionNode
Simple expression node
SourceLocation
Source location span [start, end)
TemplateLiteral
Template literal
TextCallNode
Text call node
TextNode
Text node
TransformOptions
Transform options
VNodeCall
VNode call expression

Enums§

ArrayElement
Array element type
BindingType
Binding type from script setup.
BlockStatementBody
Block statement body item
CallArgument
Call argument type
Callee
Callee type
CodegenMode
Codegen output mode
CompoundExpressionChild
Child of a compound expression
ConstantType
Constant type levels for static analysis
DynamicProps
Dynamic props type
ElementType
Element type discriminant
ErrorCode
Error codes for compiler errors
ExpressionNode
Expression node types
FunctionBody
Function body
FunctionParam
Single function parameter
FunctionParams
Function parameters
FunctionReturns
Function returns
IfStatementAlternate
If statement alternate
JsChildNode
All JavaScript child node types for codegen
Namespace
Namespace for elements
NodeType
Node type discriminant
ParseMode
Parse mode for the tokenizer
PropNode
Prop node (attribute or directive)
PropsExpression
Props expression type
ReturnValue
Return value type
RuntimeHelper
Runtime helper symbols
SlotsExpression
Slots expression
TemplateChildNode
All template child node types
TemplateLiteralElement
Template literal element
TemplateSyntaxMode
Template syntax compatibility mode.
TemplateTextChildNode
Template text child node
TextCallContent
Text call content
TextMode
Text mode for different contexts
VNodeChildren
VNode children type
VNodeTag
VNode tag type
WhitespaceStrategy
Whitespace handling strategy

Traits§

CloneIn
Re-export allocator types for convenience Trait for cloning a value into an arena allocator.

Functions§

camelize
Convert kebab-case to camelCase Example: “foo-bar” -> “fooBar”
parse
Parse a Vue template
parse_with_options
Parse a Vue template with options
parse_with_options_and_invalid_html_self_closingDeprecated
Parse a Vue template with options and invalid HTML self-closing compatibility.
parse_with_options_and_template_syntax
Parse a Vue template with options and template syntax compatibility.

Type Aliases§

CompilerResult
Result type for compiler operations