ast: we don't need zero node
Also trigger a build on Travis
This commit is contained in:
parent
079bc726dd
commit
68aca194ab
14
ast/ast.go
14
ast/ast.go
@ -10,12 +10,6 @@ type Node interface {
|
|||||||
Pos() token.Pos
|
Pos() token.Pos
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewNode returns a non usable Node interface implementer. The position is
|
|
||||||
// initalizied to zero.
|
|
||||||
func NewNode() Node {
|
|
||||||
return &zero{}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (File) node() {}
|
func (File) node() {}
|
||||||
func (ObjectList) node() {}
|
func (ObjectList) node() {}
|
||||||
func (ObjectKey) node() {}
|
func (ObjectKey) node() {}
|
||||||
@ -27,14 +21,6 @@ func (ObjectType) node() {}
|
|||||||
func (LiteralType) node() {}
|
func (LiteralType) node() {}
|
||||||
func (ListType) node() {}
|
func (ListType) node() {}
|
||||||
|
|
||||||
type zero struct{}
|
|
||||||
|
|
||||||
func (zero) node() {}
|
|
||||||
|
|
||||||
func (z *zero) Pos() token.Pos {
|
|
||||||
return token.Pos{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// File represents a single HCL file
|
// File represents a single HCL file
|
||||||
type File struct {
|
type File struct {
|
||||||
Node Node // usually a *ObjectList
|
Node Node // usually a *ObjectList
|
||||||
|
Loading…
Reference in New Issue
Block a user