terraform/config/lang/ast/variable_access.go

28 lines
413 B
Go
Raw Normal View History

2015-01-11 21:38:45 +01:00
package ast
2015-01-11 22:03:37 +01:00
import (
"fmt"
)
2015-01-11 21:38:45 +01:00
// VariableAccess represents a variable access.
type VariableAccess struct {
Name string
2015-01-12 09:28:47 +01:00
Posx Pos
2015-01-11 21:38:45 +01:00
}
2015-01-11 22:03:37 +01:00
2015-01-12 00:26:54 +01:00
func (n *VariableAccess) Accept(v Visitor) {
v(n)
}
2015-01-12 09:28:47 +01:00
func (n *VariableAccess) Pos() Pos {
return n.Posx
}
2015-01-11 22:03:37 +01:00
func (n *VariableAccess) GoString() string {
return fmt.Sprintf("*%#v", *n)
}
2015-01-13 17:50:28 +01:00
func (n *VariableAccess) String() string {
return fmt.Sprintf("Variable(%s)", n.Name)
}