remove StringVar attribute from expr.Variable
This commit is contained in:
@@ -9,10 +9,9 @@ import (
|
||||
|
||||
// Variable node
|
||||
type Variable struct {
|
||||
Meta meta.Collection
|
||||
StringVar bool
|
||||
Position *position.Position
|
||||
VarName node.Node
|
||||
Meta meta.Collection
|
||||
Position *position.Position
|
||||
VarName node.Node
|
||||
}
|
||||
|
||||
// NewVariable node constructor
|
||||
@@ -38,9 +37,7 @@ func (n *Variable) GetMeta() *meta.Collection {
|
||||
|
||||
// Attributes returns node attributes as map
|
||||
func (n *Variable) Attributes() map[string]interface{} {
|
||||
return map[string]interface{}{
|
||||
"StringVar": n.StringVar,
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// SetVarName reset var name
|
||||
|
||||
@@ -333,9 +333,7 @@ var nodesToTest = []struct {
|
||||
{
|
||||
&expr.Variable{VarName: &node.Identifier{Value: "a"}},
|
||||
[]string{"VarName"},
|
||||
map[string]interface{}{
|
||||
"StringVar": false,
|
||||
},
|
||||
map[string]interface{}{},
|
||||
},
|
||||
{
|
||||
&expr.YieldFrom{
|
||||
|
||||
Reference in New Issue
Block a user