Versions in this module Expand all Collapse all v0 v0.3.0 Jul 26, 2025 v0.2.0 Jul 19, 2025 Changes in this version + func Token(tok htok.Token) btok.Token + func Transpile(opts *config.Huloc, vfs vfs.VFS, basePath string) (map[string]string, error) + type BashTranspiler struct + func NewBashTranspiler(opts *config.Huloc, vfs vfs.VFS) *BashTranspiler + func (b *BashTranspiler) Convert(node hast.Node) bast.Node + func (b *BashTranspiler) ConvertArrayLiteralExpr(node *hast.ArrayLiteralExpr) bast.Node + func (b *BashTranspiler) ConvertAssignStmt(node *hast.AssignStmt) bast.Node + func (b *BashTranspiler) ConvertBinaryExpr(node *hast.BinaryExpr) bast.Node + func (b *BashTranspiler) ConvertBlockStmt(node *hast.BlockStmt) bast.Node + func (b *BashTranspiler) ConvertCallExpr(node *hast.CallExpr) bast.Node + func (b *BashTranspiler) ConvertClassDecl(node *hast.ClassDecl) bast.Node + func (b *BashTranspiler) ConvertCmdExpr(node *hast.CmdExpr) bast.Node + func (b *BashTranspiler) ConvertComment(node *hast.Comment) bast.Node + func (b *BashTranspiler) ConvertCommentGroup(node *hast.CommentGroup) bast.Node + func (b *BashTranspiler) ConvertDeclareDecl(node *hast.DeclareDecl) bast.Node + func (b *BashTranspiler) ConvertDoWhileStmt(node *hast.DoWhileStmt) bast.Node + func (b *BashTranspiler) ConvertExprStmt(node *hast.ExprStmt) bast.Node + func (b *BashTranspiler) ConvertFalseLiteral(node *hast.FalseLiteral) bast.Node + func (b *BashTranspiler) ConvertFile(node *hast.File) bast.Node + func (b *BashTranspiler) ConvertForInStmt(node *hast.ForInStmt) bast.Node + func (b *BashTranspiler) ConvertForOfStmt(node *hast.ForeachStmt) bast.Node + func (b *BashTranspiler) ConvertForStmt(node *hast.ForStmt) bast.Node + func (b *BashTranspiler) ConvertForeachStmt(node *hast.ForeachStmt) bast.Node + func (b *BashTranspiler) ConvertFuncDecl(node *hast.FuncDecl) bast.Node + func (b *BashTranspiler) ConvertIdent(node *hast.Ident) bast.Node + func (b *BashTranspiler) ConvertIfStmt(node *hast.IfStmt) bast.Node + func (b *BashTranspiler) ConvertImport(node *hast.Import) bast.Node + func (b *BashTranspiler) ConvertIncDecExpr(node *hast.IncDecExpr) bast.Node + func (b *BashTranspiler) ConvertMatchStmt(node *hast.MatchStmt) bast.Node + func (b *BashTranspiler) ConvertNumericLiteral(node *hast.NumericLiteral) bast.Node + func (b *BashTranspiler) ConvertObjectLiteralExpr(node *hast.ObjectLiteralExpr) bast.Node + func (b *BashTranspiler) ConvertParameter(node *hast.Parameter) bast.Node + func (b *BashTranspiler) ConvertRefExpr(node *hast.RefExpr) bast.Node + func (b *BashTranspiler) ConvertReturnStmt(node *hast.ReturnStmt) bast.Node + func (b *BashTranspiler) ConvertSelectExpr(node *hast.SelectExpr) bast.Node + func (b *BashTranspiler) ConvertStringLiteral(node *hast.StringLiteral) bast.Node + func (b *BashTranspiler) ConvertTrueLiteral(node *hast.TrueLiteral) bast.Node + func (b *BashTranspiler) ConvertWhileStmt(node *hast.WhileStmt) bast.Node + func (b *BashTranspiler) Emit(stmt bast.Stmt) + func (b *BashTranspiler) Transpile(mainFile string) (map[string]string, error) + func (v *BashTranspiler) Flush() []bast.Stmt + type CompileRuleFunc func(node hast.Node) (bast.Node, error) + type DependencyResolver struct + type ExportInfo struct + Kind ExportKind + Name string + Public bool + Value hast.Node + type ExportKind int + const ExportClass + const ExportConstant + const ExportFunction + const ExportVariable + type HCRDispatcher struct + func (d *HCRDispatcher) Get(ruleName string) (transpiler.Strategy[bast.Node], error) + func (d *HCRDispatcher) Put(fullRule string, cb transpiler.Strategy[bast.Node]) error + type ImportInfo struct + Alias string + Kind ImportKind + ModulePath string + SymbolName []string + type ImportKind int + const ImportAll + const ImportMulti + const ImportSingle + type Module struct + AST *hast.File + Dependencies []string + Exports map[string]*ExportInfo + Imports []*ImportInfo + Name string + Path string + Symbols *SymbolTable + Transpiled *bast.File + type ModuleManager struct + func (mm *ModuleManager) GetModule(path string) *Module + func (mm *ModuleManager) ResolveAllDependencies(mainFile string) ([]*Module, error) + type Scope struct + ID string + Module *Module + Parent *Scope + Type ScopeType + Variables map[string]*Symbol + type ScopeStack struct + func (ss *ScopeStack) Current() *Scope + func (ss *ScopeStack) Pop() + func (ss *ScopeStack) Push(scope *Scope) + type ScopeType int + const BlockScope + const ClassScope + const FunctionScope + const GlobalScope + type Symbol struct + IsExported bool + MangledName string + Module *Module + Name string + Scope *Scope + Type SymbolType + Value hast.Node + type SymbolTable struct + func NewSymbolTable(moduleName string, enableMangle bool) *SymbolTable + func (st *SymbolTable) AddClass(name string, node hast.Node) + func (st *SymbolTable) AddConstant(name string, node hast.Node) + func (st *SymbolTable) AddFunction(name string, node hast.Node) + func (st *SymbolTable) AddSymbol(symbol *Symbol) + func (st *SymbolTable) AddVariable(name string, node hast.Node) + func (st *SymbolTable) AllocVariableName(originalName string, scope *Scope) string + func (st *SymbolTable) CurrentScope() *Scope + func (st *SymbolTable) HasClass(name string) bool + func (st *SymbolTable) HasConstant(name string) bool + func (st *SymbolTable) HasFunction(name string) bool + func (st *SymbolTable) HasVariable(name string) bool + func (st *SymbolTable) LookupSymbol(name string) *Symbol + func (st *SymbolTable) PopScope() + func (st *SymbolTable) PushScope(scopeType ScopeType, module *Module) *Scope + type SymbolType int + const SymbolArray + const SymbolClass + const SymbolConstant + const SymbolFunction + const SymbolObject + const SymbolVariable