Documentation ¶
Index ¶
- func CopyFieldWithLabel(field *ast.Field, newLabel ast.Label) *ast.Field
- func CopyFieldWithValue(field *ast.Field, newValue ast.Expr) *ast.Field
- func CopyImportDeclWithSpecs(expr *ast.ImportDecl, specs []*ast.ImportSpec) *ast.ImportDecl
- func CopyIndexExpression(expr *ast.IndexExpr, value ast.Expr) *ast.IndexExpr
- func CopyLetClauseWithValue(let *ast.LetClause, value ast.Expr) *ast.LetClause
- func CopyParenExpression(expr *ast.ParenExpr, value ast.Expr) *ast.ParenExpr
- func CopySliceExpression(expr *ast.SliceExpr, low, high ast.Expr) *ast.SliceExpr
- func CopyUnaryExpression(expr *ast.UnaryExpr, value ast.Expr) *ast.UnaryExpr
- func NewInterpolation(items []ast.Expr) *ast.Interpolation
- func ResolveIdentifierValueInExpression(expr ast.Node) (ast.Node, bool)
- func ResolveIdentifierValueInExpressionInScope(expr ast.Node, scope string) (ast.Node, bool)
- type IdentifierSet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyImportDeclWithSpecs ¶
func CopyImportDeclWithSpecs(expr *ast.ImportDecl, specs []*ast.ImportSpec) *ast.ImportDecl
func CopyIndexExpression ¶
func CopyLetClauseWithValue ¶
func CopyParenExpression ¶
func CopySliceExpression ¶
func CopyUnaryExpression ¶
func NewInterpolation ¶
func NewInterpolation(items []ast.Expr) *ast.Interpolation
func ResolveIdentifierValueInExpression ¶
ResolveIdentifierValueInExpression replaces all identifiers with their respective values Returns node with all identifiers replaced, if possible and whether a (sub-) expression was changed
Types ¶
type IdentifierSet ¶
type IdentifierSet struct {
// contains filtered or unexported fields
}
func NewIdentifierSet ¶
func NewIdentifierSet() *IdentifierSet
Click to show internal directories.
Click to hide internal directories.