Documentation ¶
Overview ¶
Package asttest implements utilities for testing the abstract syntax tree.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CompareOptions = append(IgnoreBaseNodeOptions, cmp.Comparer(func(x, y *regexp.Regexp) bool { return x.String() == y.String() }), )
View Source
var IgnoreBaseNodeOptions = []cmp.Option{ cmpopts.IgnoreFields(ast.ArrayExpression{}, "BaseNode"), cmpopts.IgnoreFields(ast.ArrowFunctionExpression{}, "BaseNode"), cmpopts.IgnoreFields(ast.BinaryExpression{}, "BaseNode"), cmpopts.IgnoreFields(ast.BlockStatement{}, "BaseNode"), cmpopts.IgnoreFields(ast.BooleanLiteral{}, "BaseNode"), cmpopts.IgnoreFields(ast.CallExpression{}, "BaseNode"), cmpopts.IgnoreFields(ast.ConditionalExpression{}, "BaseNode"), cmpopts.IgnoreFields(ast.DateTimeLiteral{}, "BaseNode"), cmpopts.IgnoreFields(ast.DurationLiteral{}, "BaseNode"), cmpopts.IgnoreFields(ast.ExpressionStatement{}, "BaseNode"), cmpopts.IgnoreFields(ast.FloatLiteral{}, "BaseNode"), cmpopts.IgnoreFields(ast.Identifier{}, "BaseNode"), cmpopts.IgnoreFields(ast.IndexExpression{}, "BaseNode"), cmpopts.IgnoreFields(ast.IntegerLiteral{}, "BaseNode"), cmpopts.IgnoreFields(ast.LogicalExpression{}, "BaseNode"), cmpopts.IgnoreFields(ast.MemberExpression{}, "BaseNode"), cmpopts.IgnoreFields(ast.ObjectExpression{}, "BaseNode"), cmpopts.IgnoreFields(ast.OptionStatement{}, "BaseNode"), cmpopts.IgnoreFields(ast.PipeExpression{}, "BaseNode"), cmpopts.IgnoreFields(ast.PipeLiteral{}, "BaseNode"), cmpopts.IgnoreFields(ast.Program{}, "BaseNode"), cmpopts.IgnoreFields(ast.Property{}, "BaseNode"), cmpopts.IgnoreFields(ast.RegexpLiteral{}, "BaseNode"), cmpopts.IgnoreFields(ast.ReturnStatement{}, "BaseNode"), cmpopts.IgnoreFields(ast.StringLiteral{}, "BaseNode"), cmpopts.IgnoreFields(ast.UnaryExpression{}, "BaseNode"), cmpopts.IgnoreFields(ast.UnsignedIntegerLiteral{}, "BaseNode"), cmpopts.IgnoreFields(ast.VariableDeclaration{}, "BaseNode"), cmpopts.IgnoreFields(ast.VariableDeclarator{}, "BaseNode"), }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.