Versions in this module Expand all Collapse all v0 v0.3.0 Jul 26, 2025 Changes in this version + func Transpile(opts *config.Huloc, vfs vfs.VFS, basePath string) (map[string]string, 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 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 *past.File + type ModuleManager struct + func (mm *ModuleManager) GetModule(path string) *Module + func (mm *ModuleManager) ResolveAllDependencies(mainFile string) ([]*Module, error) + type PowerShellTranspiler struct + func NewPowerShellTranspiler(opts *config.Huloc, vfs vfs.VFS) *PowerShellTranspiler + func (p *PowerShellTranspiler) Convert(node hast.Node) past.Node + func (p *PowerShellTranspiler) ConvertArrayLiteralExpr(node *hast.ArrayLiteralExpr) past.Node + func (p *PowerShellTranspiler) ConvertAssignStmt(node *hast.AssignStmt) past.Node + func (p *PowerShellTranspiler) ConvertBinaryExpr(node *hast.BinaryExpr) past.Node + func (p *PowerShellTranspiler) ConvertBlockStmt(node *hast.BlockStmt) past.Node + func (p *PowerShellTranspiler) ConvertBoolLiteral(node *hast.TrueLiteral) past.Node + func (p *PowerShellTranspiler) ConvertBreakStmt(node *hast.BreakStmt) past.Node + func (p *PowerShellTranspiler) ConvertCallExpr(node *hast.CallExpr) past.Node + func (p *PowerShellTranspiler) ConvertCaseClause(node *hast.CaseClause) past.Node + func (p *PowerShellTranspiler) ConvertCatchClause(node *hast.CatchClause) past.Node + func (p *PowerShellTranspiler) ConvertClassDecl(node *hast.ClassDecl) past.Node + func (p *PowerShellTranspiler) ConvertCmdExpr(node *hast.CmdExpr) past.Node + func (p *PowerShellTranspiler) ConvertComment(node *hast.Comment) past.Node + func (p *PowerShellTranspiler) ConvertCommentGroup(node *hast.CommentGroup) past.Node + func (p *PowerShellTranspiler) ConvertContinueStmt(node *hast.ContinueStmt) past.Node + func (p *PowerShellTranspiler) ConvertDoWhileStmt(node *hast.DoWhileStmt) past.Node + func (p *PowerShellTranspiler) ConvertEnumDecl(node *hast.EnumDecl) past.Node + func (p *PowerShellTranspiler) ConvertExprStmt(node *hast.ExprStmt) past.Node + func (p *PowerShellTranspiler) ConvertFalseLiteral(node *hast.FalseLiteral) past.Node + func (p *PowerShellTranspiler) ConvertFile(node *hast.File) past.Node + func (p *PowerShellTranspiler) ConvertForStmt(node *hast.ForStmt) past.Node + func (p *PowerShellTranspiler) ConvertForeachStmt(node *hast.ForeachStmt) past.Node + func (p *PowerShellTranspiler) ConvertFuncDecl(node *hast.FuncDecl) past.Node + func (p *PowerShellTranspiler) ConvertIdent(node *hast.Ident) past.Node + func (p *PowerShellTranspiler) ConvertIfStmt(node *hast.IfStmt) past.Node + func (p *PowerShellTranspiler) ConvertImport(node *hast.Import) past.Node + func (p *PowerShellTranspiler) ConvertIncDecExpr(node *hast.IncDecExpr) past.Node + func (p *PowerShellTranspiler) ConvertNumericLiteral(node *hast.NumericLiteral) past.Node + func (p *PowerShellTranspiler) ConvertObjectLiteralExpr(node *hast.ObjectLiteralExpr) past.Node + func (p *PowerShellTranspiler) ConvertParameter(node *hast.Parameter) past.Node + func (p *PowerShellTranspiler) ConvertRefExpr(node *hast.RefExpr) past.Node + func (p *PowerShellTranspiler) ConvertReturnStmt(node *hast.ReturnStmt) past.Node + func (p *PowerShellTranspiler) ConvertSelectExpr(node *hast.SelectExpr) past.Node + func (p *PowerShellTranspiler) ConvertStringLiteral(node *hast.StringLiteral) past.Node + func (p *PowerShellTranspiler) ConvertSwitchStmt(node *hast.MatchStmt) past.Node + func (p *PowerShellTranspiler) ConvertThrowStmt(node *hast.ThrowStmt) past.Node + func (p *PowerShellTranspiler) ConvertTryStmt(node *hast.TryStmt) past.Node + func (p *PowerShellTranspiler) ConvertWhileStmt(node *hast.WhileStmt) past.Node + func (p *PowerShellTranspiler) Transpile(mainFile string) (map[string]string, 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