Expand description
AST Mapping Tables for ReluxScript
This module provides comprehensive mappings between:
- ReluxScript unified AST types
- Babel (ESTree) AST types
- SWC (swc_ecma_ast) types
These mappings are used by code generators to emit correct platform-specific code.
Structs§
- Field
Mapping - Field mapping for a specific node type
- Helper
Mapping - Helper function mapping
- Node
Mapping - Mapping for a single AST node type
- Pattern
Mapping - Pattern for matching AST node types
- TsHelper
Mapping - Helper function mappings for generated code
Statics§
- NODE_
MAPPINGS - All node type mappings
Functions§
- gen_
ts_ helper_ babel - Generate Babel code for a TypeScript helper
- gen_
ts_ helper_ swc - Generate SWC code for a TypeScript helper
- get_
field_ mapping - Get field mapping
- get_
helper_ for_ field - Get helper for a field access pattern
- get_
node_ mapping - Get node mapping by ReluxScript name
- get_
node_ mapping_ by_ visitor - Get node mapping by visitor method name
- get_
pattern_ check - Get pattern check for a node type
- get_
ts_ helper - Get a TypeScript helper mapping by name