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)
|
|
|
|
}
|