ASTPass is an interface for a pass that transforms the AST in some way.
| 27 | |
| 28 | // ASTPass is an interface for a pass that transforms the AST in some way. |
| 29 | type ASTPass interface { |
| 30 | FodderElement(ASTPass, *ast.FodderElement, Context) |
| 31 | Fodder(ASTPass, *ast.Fodder, Context) |
| 32 | ForSpec(ASTPass, *ast.ForSpec, Context) |
| 33 | Parameters(ASTPass, *ast.Fodder, *[]ast.Parameter, *ast.Fodder, Context) |
| 34 | Arguments(ASTPass, *ast.Fodder, *ast.Arguments, *ast.Fodder, Context) |
| 35 | FieldParams(ASTPass, *ast.ObjectField, Context) |
| 36 | ObjectField(ASTPass, *ast.ObjectField, Context) |
| 37 | ObjectFields(ASTPass, *ast.ObjectFields, Context) |
| 38 | |
| 39 | Apply(ASTPass, *ast.Apply, Context) |
| 40 | ApplyBrace(ASTPass, *ast.ApplyBrace, Context) |
| 41 | Array(ASTPass, *ast.Array, Context) |
| 42 | ArrayComp(ASTPass, *ast.ArrayComp, Context) |
| 43 | Assert(ASTPass, *ast.Assert, Context) |
| 44 | Binary(ASTPass, *ast.Binary, Context) |
| 45 | Conditional(ASTPass, *ast.Conditional, Context) |
| 46 | Dollar(ASTPass, *ast.Dollar, Context) |
| 47 | Error(ASTPass, *ast.Error, Context) |
| 48 | Function(ASTPass, *ast.Function, Context) |
| 49 | Import(ASTPass, *ast.Import, Context) |
| 50 | ImportStr(ASTPass, *ast.ImportStr, Context) |
| 51 | ImportBin(ASTPass, *ast.ImportBin, Context) |
| 52 | Index(ASTPass, *ast.Index, Context) |
| 53 | Slice(ASTPass, *ast.Slice, Context) |
| 54 | Local(ASTPass, *ast.Local, Context) |
| 55 | LiteralBoolean(ASTPass, *ast.LiteralBoolean, Context) |
| 56 | LiteralNull(ASTPass, *ast.LiteralNull, Context) |
| 57 | LiteralNumber(ASTPass, *ast.LiteralNumber, Context) |
| 58 | LiteralString(ASTPass, *ast.LiteralString, Context) |
| 59 | Object(ASTPass, *ast.Object, Context) |
| 60 | ObjectComp(ASTPass, *ast.ObjectComp, Context) |
| 61 | Parens(ASTPass, *ast.Parens, Context) |
| 62 | Self(ASTPass, *ast.Self, Context) |
| 63 | SuperIndex(ASTPass, *ast.SuperIndex, Context) |
| 64 | InSuper(ASTPass, *ast.InSuper, Context) |
| 65 | Unary(ASTPass, *ast.Unary, Context) |
| 66 | Var(ASTPass, *ast.Var, Context) |
| 67 | |
| 68 | Visit(ASTPass, *ast.Node, Context) |
| 69 | BaseContext(ASTPass) Context |
| 70 | File(ASTPass, *ast.Node, *ast.Fodder) |
| 71 | } |
| 72 | |
| 73 | // Base implements basic traversal so other passes can extend it. |
| 74 | type Base struct { |
no outgoing calls
no test coverage detected
searching dependent graphs…