remove StringVar attribute from expr.Variable

This commit is contained in:
z7zmey
2018-10-24 17:04:13 +03:00
parent b805f0b167
commit fd87c9cc34
18 changed files with 3426 additions and 1730 deletions

View File

@@ -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

View File

@@ -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{