fdd68833f3
Rather than setting an "Unwrap" field on the existing TemplateExpr, we'll instead use a separate, simpler AST node. There is very little in common between these two cases, so overloading the TemplateExpr node doesn't buy much. A separate node is needed here, rather than just returning the wrapped node directly, to give us somewhere to capture the full source range extent of the wrapping template, whereas the inner expression only captures the range of itself. This is important both for good diagnostics and for transforming zclsyntax AST into zclwrite AST.
69 lines
1.3 KiB
Go
Executable File
69 lines
1.3 KiB
Go
Executable File
package zclsyntax
|
|
|
|
// Generated by expression_vars_get.go. DO NOT EDIT.
|
|
// Run 'go generate' on this package to update the set of functions here.
|
|
|
|
import (
|
|
"github.com/zclconf/go-zcl/zcl"
|
|
)
|
|
|
|
func (e *AnonSymbolExpr) Variables() []zcl.Traversal {
|
|
return Variables(e)
|
|
}
|
|
|
|
func (e *BinaryOpExpr) Variables() []zcl.Traversal {
|
|
return Variables(e)
|
|
}
|
|
|
|
func (e *ConditionalExpr) Variables() []zcl.Traversal {
|
|
return Variables(e)
|
|
}
|
|
|
|
func (e *ForExpr) Variables() []zcl.Traversal {
|
|
return Variables(e)
|
|
}
|
|
|
|
func (e *FunctionCallExpr) Variables() []zcl.Traversal {
|
|
return Variables(e)
|
|
}
|
|
|
|
func (e *IndexExpr) Variables() []zcl.Traversal {
|
|
return Variables(e)
|
|
}
|
|
|
|
func (e *LiteralValueExpr) Variables() []zcl.Traversal {
|
|
return Variables(e)
|
|
}
|
|
|
|
func (e *ObjectConsExpr) Variables() []zcl.Traversal {
|
|
return Variables(e)
|
|
}
|
|
|
|
func (e *RelativeTraversalExpr) Variables() []zcl.Traversal {
|
|
return Variables(e)
|
|
}
|
|
|
|
func (e *ScopeTraversalExpr) Variables() []zcl.Traversal {
|
|
return Variables(e)
|
|
}
|
|
|
|
func (e *SplatExpr) Variables() []zcl.Traversal {
|
|
return Variables(e)
|
|
}
|
|
|
|
func (e *TemplateExpr) Variables() []zcl.Traversal {
|
|
return Variables(e)
|
|
}
|
|
|
|
func (e *TemplateWrapExpr) Variables() []zcl.Traversal {
|
|
return Variables(e)
|
|
}
|
|
|
|
func (e *TupleConsExpr) Variables() []zcl.Traversal {
|
|
return Variables(e)
|
|
}
|
|
|
|
func (e *UnaryOpExpr) Variables() []zcl.Traversal {
|
|
return Variables(e)
|
|
}
|