#25: save comments within node

This commit is contained in:
z7zmey 2018-06-25 15:38:31 +03:00
parent 1ebb0c6fad
commit 3cd45ecac5
183 changed files with 16743 additions and 14671 deletions

View File

@ -6,35 +6,25 @@ import (
// Comment aggrigates information about comment /** // Comment aggrigates information about comment /**
type Comment struct { type Comment struct {
value string Value string
position *position.Position Position *position.Position
tokenName TokenName TokenName TokenName
} }
// NewComment - Comment constructor // NewComment - Comment constructor
func NewComment(value string, pos *position.Position) *Comment { func NewComment(value string, pos *position.Position) *Comment {
return &Comment{ return &Comment{
value, Value: value,
pos, Position: pos,
UnknownToken, TokenName: UnknownToken,
} }
} }
// SetTokenName sets token name // SetTokenName sets token name
func (c *Comment) SetTokenName(tokenName TokenName) { func (c *Comment) SetTokenName(tokenName TokenName) {
c.tokenName = tokenName c.TokenName = tokenName
}
// TokenName returns token name
func (c *Comment) TokenName() TokenName {
return c.tokenName
} }
func (c *Comment) String() string { func (c *Comment) String() string {
return c.value return c.Value
}
// Position returns comment position
func (c *Comment) Position() *position.Position {
return c.position
} }

View File

@ -3,23 +3,9 @@ package comment_test
import ( import (
"testing" "testing"
"github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/comment" "github.com/z7zmey/php-parser/comment"
) )
func TestCommentGetPosition(t *testing.T) {
expected := position.NewPosition(0, 0, 0, 0)
comment := comment.NewComment("/** hello world */", expected)
actual := comment.Position()
if expected != actual {
t.Errorf("expected and actual are not equal\n")
}
}
func TestCommentPrint(t *testing.T) { func TestCommentPrint(t *testing.T) {
expected := "/** hello world */" expected := "/** hello world */"
@ -31,3 +17,15 @@ func TestCommentPrint(t *testing.T) {
t.Errorf("expected and actual are not equal\n") t.Errorf("expected and actual are not equal\n")
} }
} }
func TestCommentSetTokenName(t *testing.T) {
expected := comment.ArrayToken
c := comment.NewComment("/** hello world */", nil)
c.SetTokenName(expected)
actual := c.TokenName
if expected != actual {
t.Errorf("expected and actual are not equal\n")
}
}

View File

@ -1,6 +1,7 @@
package assign package assign
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// Assign node // Assign node
type Assign struct { type Assign struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Variable node.Node Variable node.Node
Expression node.Node Expression node.Node
@ -31,6 +33,17 @@ func (n *Assign) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *Assign) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *Assign) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *Assign) Attributes() map[string]interface{} { func (n *Assign) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package assign package assign
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// Reference node // Reference node
type Reference struct { type Reference struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Variable node.Node Variable node.Node
Expression node.Node Expression node.Node
@ -31,6 +33,17 @@ func (n *Reference) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *Reference) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *Reference) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *Reference) Attributes() map[string]interface{} { func (n *Reference) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package assign package assign
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// BitwiseAnd node // BitwiseAnd node
type BitwiseAnd struct { type BitwiseAnd struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Variable node.Node Variable node.Node
Expression node.Node Expression node.Node
@ -31,6 +33,17 @@ func (n *BitwiseAnd) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *BitwiseAnd) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *BitwiseAnd) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *BitwiseAnd) Attributes() map[string]interface{} { func (n *BitwiseAnd) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package assign package assign
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// BitwiseOr node // BitwiseOr node
type BitwiseOr struct { type BitwiseOr struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Variable node.Node Variable node.Node
Expression node.Node Expression node.Node
@ -31,6 +33,17 @@ func (n *BitwiseOr) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *BitwiseOr) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *BitwiseOr) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *BitwiseOr) Attributes() map[string]interface{} { func (n *BitwiseOr) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package assign package assign
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// BitwiseXor node // BitwiseXor node
type BitwiseXor struct { type BitwiseXor struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Variable node.Node Variable node.Node
Expression node.Node Expression node.Node
@ -31,6 +33,17 @@ func (n *BitwiseXor) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *BitwiseXor) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *BitwiseXor) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *BitwiseXor) Attributes() map[string]interface{} { func (n *BitwiseXor) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package assign package assign
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// Concat node // Concat node
type Concat struct { type Concat struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Variable node.Node Variable node.Node
Expression node.Node Expression node.Node
@ -31,6 +33,17 @@ func (n *Concat) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *Concat) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *Concat) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *Concat) Attributes() map[string]interface{} { func (n *Concat) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package assign package assign
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// Div node // Div node
type Div struct { type Div struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Variable node.Node Variable node.Node
Expression node.Node Expression node.Node
@ -31,6 +33,17 @@ func (n *Div) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *Div) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *Div) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *Div) Attributes() map[string]interface{} { func (n *Div) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package assign package assign
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// Minus node // Minus node
type Minus struct { type Minus struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Variable node.Node Variable node.Node
Expression node.Node Expression node.Node
@ -31,6 +33,17 @@ func (n *Minus) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *Minus) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *Minus) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *Minus) Attributes() map[string]interface{} { func (n *Minus) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package assign package assign
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// Mod node // Mod node
type Mod struct { type Mod struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Variable node.Node Variable node.Node
Expression node.Node Expression node.Node
@ -31,6 +33,17 @@ func (n *Mod) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *Mod) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *Mod) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *Mod) Attributes() map[string]interface{} { func (n *Mod) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package assign package assign
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// Mul node // Mul node
type Mul struct { type Mul struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Variable node.Node Variable node.Node
Expression node.Node Expression node.Node
@ -31,6 +33,17 @@ func (n *Mul) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *Mul) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *Mul) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *Mul) Attributes() map[string]interface{} { func (n *Mul) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package assign package assign
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// Plus node // Plus node
type Plus struct { type Plus struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Variable node.Node Variable node.Node
Expression node.Node Expression node.Node
@ -31,6 +33,17 @@ func (n *Plus) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *Plus) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *Plus) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *Plus) Attributes() map[string]interface{} { func (n *Plus) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package assign package assign
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// Pow node // Pow node
type Pow struct { type Pow struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Variable node.Node Variable node.Node
Expression node.Node Expression node.Node
@ -31,6 +33,17 @@ func (n *Pow) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *Pow) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *Pow) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *Pow) Attributes() map[string]interface{} { func (n *Pow) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package assign package assign
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// ShiftLeft node // ShiftLeft node
type ShiftLeft struct { type ShiftLeft struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Variable node.Node Variable node.Node
Expression node.Node Expression node.Node
@ -31,6 +33,17 @@ func (n *ShiftLeft) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *ShiftLeft) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *ShiftLeft) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *ShiftLeft) Attributes() map[string]interface{} { func (n *ShiftLeft) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package assign package assign
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// ShiftRight node // ShiftRight node
type ShiftRight struct { type ShiftRight struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Variable node.Node Variable node.Node
Expression node.Node Expression node.Node
@ -31,6 +33,17 @@ func (n *ShiftRight) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *ShiftRight) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *ShiftRight) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *ShiftRight) Attributes() map[string]interface{} { func (n *ShiftRight) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package binary package binary
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// BitwiseAnd node // BitwiseAnd node
type BitwiseAnd struct { type BitwiseAnd struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Left node.Node Left node.Node
Right node.Node Right node.Node
@ -31,6 +33,17 @@ func (n *BitwiseAnd) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *BitwiseAnd) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *BitwiseAnd) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *BitwiseAnd) Attributes() map[string]interface{} { func (n *BitwiseAnd) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package binary package binary
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// BitwiseOr node // BitwiseOr node
type BitwiseOr struct { type BitwiseOr struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Left node.Node Left node.Node
Right node.Node Right node.Node
@ -31,6 +33,17 @@ func (n *BitwiseOr) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *BitwiseOr) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *BitwiseOr) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *BitwiseOr) Attributes() map[string]interface{} { func (n *BitwiseOr) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package binary package binary
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// BitwiseXor node // BitwiseXor node
type BitwiseXor struct { type BitwiseXor struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Left node.Node Left node.Node
Right node.Node Right node.Node
@ -31,6 +33,17 @@ func (n *BitwiseXor) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *BitwiseXor) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *BitwiseXor) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *BitwiseXor) Attributes() map[string]interface{} { func (n *BitwiseXor) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package binary package binary
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// BooleanAnd node // BooleanAnd node
type BooleanAnd struct { type BooleanAnd struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Left node.Node Left node.Node
Right node.Node Right node.Node
@ -31,6 +33,17 @@ func (n *BooleanAnd) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *BooleanAnd) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *BooleanAnd) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *BooleanAnd) Attributes() map[string]interface{} { func (n *BooleanAnd) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package binary package binary
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// BooleanOr node // BooleanOr node
type BooleanOr struct { type BooleanOr struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Left node.Node Left node.Node
Right node.Node Right node.Node
@ -31,6 +33,17 @@ func (n *BooleanOr) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *BooleanOr) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *BooleanOr) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *BooleanOr) Attributes() map[string]interface{} { func (n *BooleanOr) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package binary package binary
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// Coalesce node // Coalesce node
type Coalesce struct { type Coalesce struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Left node.Node Left node.Node
Right node.Node Right node.Node
@ -31,6 +33,17 @@ func (n *Coalesce) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *Coalesce) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *Coalesce) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *Coalesce) Attributes() map[string]interface{} { func (n *Coalesce) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package binary package binary
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// Concat node // Concat node
type Concat struct { type Concat struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Left node.Node Left node.Node
Right node.Node Right node.Node
@ -31,6 +33,17 @@ func (n *Concat) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *Concat) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *Concat) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *Concat) Attributes() map[string]interface{} { func (n *Concat) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package binary package binary
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// Div node // Div node
type Div struct { type Div struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Left node.Node Left node.Node
Right node.Node Right node.Node
@ -31,6 +33,17 @@ func (n *Div) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *Div) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *Div) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *Div) Attributes() map[string]interface{} { func (n *Div) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package binary package binary
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// Equal node // Equal node
type Equal struct { type Equal struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Left node.Node Left node.Node
Right node.Node Right node.Node
@ -31,6 +33,17 @@ func (n *Equal) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *Equal) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *Equal) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *Equal) Attributes() map[string]interface{} { func (n *Equal) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package binary package binary
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// Greater node // Greater node
type Greater struct { type Greater struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Left node.Node Left node.Node
Right node.Node Right node.Node
@ -31,6 +33,17 @@ func (n *Greater) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *Greater) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *Greater) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *Greater) Attributes() map[string]interface{} { func (n *Greater) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package binary package binary
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// GreaterOrEqual node // GreaterOrEqual node
type GreaterOrEqual struct { type GreaterOrEqual struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Left node.Node Left node.Node
Right node.Node Right node.Node
@ -31,6 +33,17 @@ func (n *GreaterOrEqual) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *GreaterOrEqual) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *GreaterOrEqual) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *GreaterOrEqual) Attributes() map[string]interface{} { func (n *GreaterOrEqual) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package binary package binary
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// Identical node // Identical node
type Identical struct { type Identical struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Left node.Node Left node.Node
Right node.Node Right node.Node
@ -31,6 +33,17 @@ func (n *Identical) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *Identical) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *Identical) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *Identical) Attributes() map[string]interface{} { func (n *Identical) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package binary package binary
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// LogicalAnd node // LogicalAnd node
type LogicalAnd struct { type LogicalAnd struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Left node.Node Left node.Node
Right node.Node Right node.Node
@ -31,6 +33,17 @@ func (n *LogicalAnd) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *LogicalAnd) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *LogicalAnd) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *LogicalAnd) Attributes() map[string]interface{} { func (n *LogicalAnd) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package binary package binary
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// LogicalOr node // LogicalOr node
type LogicalOr struct { type LogicalOr struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Left node.Node Left node.Node
Right node.Node Right node.Node
@ -31,6 +33,17 @@ func (n *LogicalOr) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *LogicalOr) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *LogicalOr) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *LogicalOr) Attributes() map[string]interface{} { func (n *LogicalOr) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package binary package binary
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// LogicalXor node // LogicalXor node
type LogicalXor struct { type LogicalXor struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Left node.Node Left node.Node
Right node.Node Right node.Node
@ -31,6 +33,17 @@ func (n *LogicalXor) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *LogicalXor) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *LogicalXor) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *LogicalXor) Attributes() map[string]interface{} { func (n *LogicalXor) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package binary package binary
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// Minus node // Minus node
type Minus struct { type Minus struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Left node.Node Left node.Node
Right node.Node Right node.Node
@ -31,6 +33,17 @@ func (n *Minus) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *Minus) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *Minus) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *Minus) Attributes() map[string]interface{} { func (n *Minus) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package binary package binary
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// Mod node // Mod node
type Mod struct { type Mod struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Left node.Node Left node.Node
Right node.Node Right node.Node
@ -31,6 +33,17 @@ func (n *Mod) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *Mod) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *Mod) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *Mod) Attributes() map[string]interface{} { func (n *Mod) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package binary package binary
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// Mul node // Mul node
type Mul struct { type Mul struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Left node.Node Left node.Node
Right node.Node Right node.Node
@ -31,6 +33,17 @@ func (n *Mul) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *Mul) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *Mul) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *Mul) Attributes() map[string]interface{} { func (n *Mul) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package binary package binary
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// NotEqual node // NotEqual node
type NotEqual struct { type NotEqual struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Left node.Node Left node.Node
Right node.Node Right node.Node
@ -31,6 +33,17 @@ func (n *NotEqual) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *NotEqual) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *NotEqual) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *NotEqual) Attributes() map[string]interface{} { func (n *NotEqual) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package binary package binary
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// NotIdentical node // NotIdentical node
type NotIdentical struct { type NotIdentical struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Left node.Node Left node.Node
Right node.Node Right node.Node
@ -31,6 +33,17 @@ func (n *NotIdentical) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *NotIdentical) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *NotIdentical) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *NotIdentical) Attributes() map[string]interface{} { func (n *NotIdentical) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package binary package binary
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// Plus node // Plus node
type Plus struct { type Plus struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Left node.Node Left node.Node
Right node.Node Right node.Node
@ -31,6 +33,17 @@ func (n *Plus) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *Plus) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *Plus) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *Plus) Attributes() map[string]interface{} { func (n *Plus) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package binary package binary
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// Pow node // Pow node
type Pow struct { type Pow struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Left node.Node Left node.Node
Right node.Node Right node.Node
@ -31,6 +33,17 @@ func (n *Pow) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *Pow) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *Pow) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *Pow) Attributes() map[string]interface{} { func (n *Pow) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package binary package binary
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// ShiftLeft node // ShiftLeft node
type ShiftLeft struct { type ShiftLeft struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Left node.Node Left node.Node
Right node.Node Right node.Node
@ -31,6 +33,17 @@ func (n *ShiftLeft) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *ShiftLeft) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *ShiftLeft) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *ShiftLeft) Attributes() map[string]interface{} { func (n *ShiftLeft) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package binary package binary
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// ShiftRight node // ShiftRight node
type ShiftRight struct { type ShiftRight struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Left node.Node Left node.Node
Right node.Node Right node.Node
@ -31,6 +33,17 @@ func (n *ShiftRight) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *ShiftRight) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *ShiftRight) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *ShiftRight) Attributes() map[string]interface{} { func (n *ShiftRight) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package binary package binary
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// Smaller node // Smaller node
type Smaller struct { type Smaller struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Left node.Node Left node.Node
Right node.Node Right node.Node
@ -31,6 +33,17 @@ func (n *Smaller) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *Smaller) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *Smaller) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *Smaller) Attributes() map[string]interface{} { func (n *Smaller) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package binary package binary
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// SmallerOrEqual node // SmallerOrEqual node
type SmallerOrEqual struct { type SmallerOrEqual struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Left node.Node Left node.Node
Right node.Node Right node.Node
@ -31,6 +33,17 @@ func (n *SmallerOrEqual) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *SmallerOrEqual) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *SmallerOrEqual) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *SmallerOrEqual) Attributes() map[string]interface{} { func (n *SmallerOrEqual) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package binary package binary
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// Spaceship node // Spaceship node
type Spaceship struct { type Spaceship struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Left node.Node Left node.Node
Right node.Node Right node.Node
@ -31,6 +33,17 @@ func (n *Spaceship) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *Spaceship) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *Spaceship) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *Spaceship) Attributes() map[string]interface{} { func (n *Spaceship) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package cast package cast
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// Array node // Array node
type Array struct { type Array struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Expr node.Node Expr node.Node
} }
@ -29,6 +31,17 @@ func (n *Array) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *Array) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *Array) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *Array) Attributes() map[string]interface{} { func (n *Array) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package cast package cast
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// Bool node // Bool node
type Bool struct { type Bool struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Expr node.Node Expr node.Node
} }
@ -29,6 +31,17 @@ func (n *Bool) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *Bool) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *Bool) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *Bool) Attributes() map[string]interface{} { func (n *Bool) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package cast package cast
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// Double node // Double node
type Double struct { type Double struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Expr node.Node Expr node.Node
} }
@ -29,6 +31,17 @@ func (n *Double) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *Double) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *Double) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *Double) Attributes() map[string]interface{} { func (n *Double) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package cast package cast
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// Int node // Int node
type Int struct { type Int struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Expr node.Node Expr node.Node
} }
@ -29,6 +31,17 @@ func (n *Int) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *Int) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *Int) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *Int) Attributes() map[string]interface{} { func (n *Int) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package cast package cast
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// Object node // Object node
type Object struct { type Object struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Expr node.Node Expr node.Node
} }
@ -29,6 +31,17 @@ func (n *Object) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *Object) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *Object) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *Object) Attributes() map[string]interface{} { func (n *Object) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package cast package cast
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// String node // String node
type String struct { type String struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Expr node.Node Expr node.Node
} }
@ -29,6 +31,17 @@ func (n *String) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *String) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *String) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *String) Attributes() map[string]interface{} { func (n *String) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package cast package cast
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// Unset node // Unset node
type Unset struct { type Unset struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Expr node.Node Expr node.Node
} }
@ -29,6 +31,17 @@ func (n *Unset) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *Unset) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *Unset) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *Unset) Attributes() map[string]interface{} { func (n *Unset) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package expr package expr
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// Array node // Array node
type Array struct { type Array struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Items []node.Node Items []node.Node
} }
@ -29,6 +31,17 @@ func (n *Array) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *Array) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *Array) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *Array) Attributes() map[string]interface{} { func (n *Array) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package expr package expr
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// ArrayDimFetch node // ArrayDimFetch node
type ArrayDimFetch struct { type ArrayDimFetch struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Variable node.Node Variable node.Node
Dim node.Node Dim node.Node
@ -31,6 +33,17 @@ func (n *ArrayDimFetch) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *ArrayDimFetch) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *ArrayDimFetch) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *ArrayDimFetch) Attributes() map[string]interface{} { func (n *ArrayDimFetch) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package expr package expr
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// ArrayItem node // ArrayItem node
type ArrayItem struct { type ArrayItem struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Key node.Node Key node.Node
Val node.Node Val node.Node
@ -31,6 +33,17 @@ func (n *ArrayItem) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *ArrayItem) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *ArrayItem) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *ArrayItem) Attributes() map[string]interface{} { func (n *ArrayItem) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package expr package expr
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// BitwiseNot node // BitwiseNot node
type BitwiseNot struct { type BitwiseNot struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Expr node.Node Expr node.Node
} }
@ -29,6 +31,17 @@ func (n *BitwiseNot) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *BitwiseNot) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *BitwiseNot) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *BitwiseNot) Attributes() map[string]interface{} { func (n *BitwiseNot) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package expr package expr
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// BooleanNot node // BooleanNot node
type BooleanNot struct { type BooleanNot struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Expr node.Node Expr node.Node
} }
@ -29,6 +31,17 @@ func (n *BooleanNot) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *BooleanNot) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *BooleanNot) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *BooleanNot) Attributes() map[string]interface{} { func (n *BooleanNot) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package expr package expr
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// ClassConstFetch node // ClassConstFetch node
type ClassConstFetch struct { type ClassConstFetch struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Class node.Node Class node.Node
ConstantName node.Node ConstantName node.Node
@ -31,6 +33,17 @@ func (n *ClassConstFetch) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *ClassConstFetch) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *ClassConstFetch) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *ClassConstFetch) Attributes() map[string]interface{} { func (n *ClassConstFetch) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package expr package expr
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// Clone node // Clone node
type Clone struct { type Clone struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Expr node.Node Expr node.Node
} }
@ -29,6 +31,17 @@ func (n *Clone) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *Clone) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *Clone) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *Clone) Attributes() map[string]interface{} { func (n *Clone) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package expr package expr
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// Closure node // Closure node
type Closure struct { type Closure struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
ReturnsRef bool ReturnsRef bool
Static bool Static bool
@ -41,6 +43,17 @@ func (n *Closure) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *Closure) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *Closure) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *Closure) Attributes() map[string]interface{} { func (n *Closure) Attributes() map[string]interface{} {
return map[string]interface{}{ return map[string]interface{}{

View File

@ -1,6 +1,7 @@
package expr package expr
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// ClosureUse node // ClosureUse node
type ClosureUse struct { type ClosureUse struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Uses []node.Node Uses []node.Node
} }
@ -29,6 +31,17 @@ func (n *ClosureUse) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *ClosureUse) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *ClosureUse) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *ClosureUse) Attributes() map[string]interface{} { func (n *ClosureUse) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package expr package expr
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// ConstFetch node // ConstFetch node
type ConstFetch struct { type ConstFetch struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Constant node.Node Constant node.Node
} }
@ -29,6 +31,17 @@ func (n *ConstFetch) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *ConstFetch) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *ConstFetch) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *ConstFetch) Attributes() map[string]interface{} { func (n *ConstFetch) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package expr package expr
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// Die node // Die node
type Die struct { type Die struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Expr node.Node Expr node.Node
} }
@ -29,6 +31,17 @@ func (n *Die) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *Die) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *Die) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *Die) Attributes() map[string]interface{} { func (n *Die) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package expr package expr
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// Empty node // Empty node
type Empty struct { type Empty struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Expr node.Node Expr node.Node
} }
@ -29,6 +31,17 @@ func (n *Empty) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *Empty) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *Empty) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *Empty) Attributes() map[string]interface{} { func (n *Empty) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package expr package expr
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// ErrorSuppress node // ErrorSuppress node
type ErrorSuppress struct { type ErrorSuppress struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Expr node.Node Expr node.Node
} }
@ -29,6 +31,17 @@ func (n *ErrorSuppress) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *ErrorSuppress) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *ErrorSuppress) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *ErrorSuppress) Attributes() map[string]interface{} { func (n *ErrorSuppress) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package expr package expr
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// Eval node // Eval node
type Eval struct { type Eval struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Expr node.Node Expr node.Node
} }
@ -29,6 +31,17 @@ func (n *Eval) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *Eval) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *Eval) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *Eval) Attributes() map[string]interface{} { func (n *Eval) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package expr package expr
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// Exit node // Exit node
type Exit struct { type Exit struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Expr node.Node Expr node.Node
} }
@ -29,6 +31,17 @@ func (n *Exit) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *Exit) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *Exit) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *Exit) Attributes() map[string]interface{} { func (n *Exit) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package expr package expr
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// FunctionCall node // FunctionCall node
type FunctionCall struct { type FunctionCall struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Function node.Node Function node.Node
ArgumentList *node.ArgumentList ArgumentList *node.ArgumentList
@ -31,6 +33,17 @@ func (n *FunctionCall) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *FunctionCall) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *FunctionCall) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *FunctionCall) Attributes() map[string]interface{} { func (n *FunctionCall) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package expr package expr
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// Include node // Include node
type Include struct { type Include struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Expr node.Node Expr node.Node
} }
@ -29,6 +31,17 @@ func (n *Include) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *Include) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *Include) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *Include) Attributes() map[string]interface{} { func (n *Include) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package expr package expr
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// IncludeOnce node // IncludeOnce node
type IncludeOnce struct { type IncludeOnce struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Expr node.Node Expr node.Node
} }
@ -29,6 +31,17 @@ func (n *IncludeOnce) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *IncludeOnce) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *IncludeOnce) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *IncludeOnce) Attributes() map[string]interface{} { func (n *IncludeOnce) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package expr package expr
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// InstanceOf node // InstanceOf node
type InstanceOf struct { type InstanceOf struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Expr node.Node Expr node.Node
Class node.Node Class node.Node
@ -31,6 +33,17 @@ func (n *InstanceOf) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *InstanceOf) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *InstanceOf) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *InstanceOf) Attributes() map[string]interface{} { func (n *InstanceOf) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package expr package expr
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// Isset node // Isset node
type Isset struct { type Isset struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Variables []node.Node Variables []node.Node
} }
@ -29,6 +31,17 @@ func (n *Isset) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *Isset) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *Isset) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *Isset) Attributes() map[string]interface{} { func (n *Isset) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package expr package expr
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// List node // List node
type List struct { type List struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Items []node.Node Items []node.Node
} }
@ -29,6 +31,17 @@ func (n *List) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *List) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *List) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *List) Attributes() map[string]interface{} { func (n *List) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package expr package expr
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// MethodCall node // MethodCall node
type MethodCall struct { type MethodCall struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Variable node.Node Variable node.Node
Method node.Node Method node.Node
@ -33,6 +35,17 @@ func (n *MethodCall) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *MethodCall) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *MethodCall) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *MethodCall) Attributes() map[string]interface{} { func (n *MethodCall) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package expr package expr
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// New node // New node
type New struct { type New struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Class node.Node Class node.Node
ArgumentList *node.ArgumentList ArgumentList *node.ArgumentList
@ -31,6 +33,17 @@ func (n *New) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *New) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *New) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *New) Attributes() map[string]interface{} { func (n *New) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package expr package expr
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// PostDec node // PostDec node
type PostDec struct { type PostDec struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Variable node.Node Variable node.Node
} }
@ -29,6 +31,17 @@ func (n *PostDec) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *PostDec) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *PostDec) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *PostDec) Attributes() map[string]interface{} { func (n *PostDec) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package expr package expr
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// PostInc node // PostInc node
type PostInc struct { type PostInc struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Variable node.Node Variable node.Node
} }
@ -29,6 +31,17 @@ func (n *PostInc) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *PostInc) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *PostInc) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *PostInc) Attributes() map[string]interface{} { func (n *PostInc) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package expr package expr
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// PreDec node // PreDec node
type PreDec struct { type PreDec struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Variable node.Node Variable node.Node
} }
@ -29,6 +31,17 @@ func (n *PreDec) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *PreDec) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *PreDec) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *PreDec) Attributes() map[string]interface{} { func (n *PreDec) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package expr package expr
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// PreInc node // PreInc node
type PreInc struct { type PreInc struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Variable node.Node Variable node.Node
} }
@ -29,6 +31,17 @@ func (n *PreInc) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *PreInc) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *PreInc) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *PreInc) Attributes() map[string]interface{} { func (n *PreInc) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package expr package expr
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// Print node // Print node
type Print struct { type Print struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Expr node.Node Expr node.Node
} }
@ -29,6 +31,17 @@ func (n *Print) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *Print) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *Print) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *Print) Attributes() map[string]interface{} { func (n *Print) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package expr package expr
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// PropertyFetch node // PropertyFetch node
type PropertyFetch struct { type PropertyFetch struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Variable node.Node Variable node.Node
Property node.Node Property node.Node
@ -31,6 +33,17 @@ func (n *PropertyFetch) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *PropertyFetch) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *PropertyFetch) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *PropertyFetch) Attributes() map[string]interface{} { func (n *PropertyFetch) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package expr package expr
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// Reference node // Reference node
type Reference struct { type Reference struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Variable node.Node Variable node.Node
} }
@ -29,6 +31,17 @@ func (n *Reference) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *Reference) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *Reference) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *Reference) Attributes() map[string]interface{} { func (n *Reference) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package expr package expr
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// Require node // Require node
type Require struct { type Require struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Expr node.Node Expr node.Node
} }
@ -29,6 +31,17 @@ func (n *Require) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *Require) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *Require) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *Require) Attributes() map[string]interface{} { func (n *Require) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package expr package expr
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// RequireOnce node // RequireOnce node
type RequireOnce struct { type RequireOnce struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Expr node.Node Expr node.Node
} }
@ -29,6 +31,17 @@ func (n *RequireOnce) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *RequireOnce) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *RequireOnce) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *RequireOnce) Attributes() map[string]interface{} { func (n *RequireOnce) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package expr package expr
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// ShellExec node // ShellExec node
type ShellExec struct { type ShellExec struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Parts []node.Node Parts []node.Node
} }
@ -29,6 +31,17 @@ func (n *ShellExec) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *ShellExec) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *ShellExec) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *ShellExec) Attributes() map[string]interface{} { func (n *ShellExec) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package expr package expr
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// ShortArray node // ShortArray node
type ShortArray struct { type ShortArray struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Items []node.Node Items []node.Node
} }
@ -29,6 +31,17 @@ func (n *ShortArray) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *ShortArray) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *ShortArray) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *ShortArray) Attributes() map[string]interface{} { func (n *ShortArray) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package expr package expr
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// ShortList node // ShortList node
type ShortList struct { type ShortList struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Items []node.Node Items []node.Node
} }
@ -29,6 +31,17 @@ func (n *ShortList) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *ShortList) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *ShortList) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *ShortList) Attributes() map[string]interface{} { func (n *ShortList) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package expr package expr
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// StaticCall node // StaticCall node
type StaticCall struct { type StaticCall struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Class node.Node Class node.Node
Call node.Node Call node.Node
@ -33,6 +35,17 @@ func (n *StaticCall) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *StaticCall) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *StaticCall) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *StaticCall) Attributes() map[string]interface{} { func (n *StaticCall) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package expr package expr
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// StaticPropertyFetch node // StaticPropertyFetch node
type StaticPropertyFetch struct { type StaticPropertyFetch struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Class node.Node Class node.Node
Property node.Node Property node.Node
@ -31,6 +33,17 @@ func (n *StaticPropertyFetch) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *StaticPropertyFetch) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *StaticPropertyFetch) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *StaticPropertyFetch) Attributes() map[string]interface{} { func (n *StaticPropertyFetch) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package expr package expr
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// Ternary node // Ternary node
type Ternary struct { type Ternary struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Condition node.Node Condition node.Node
IfTrue node.Node IfTrue node.Node
@ -33,6 +35,17 @@ func (n *Ternary) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *Ternary) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *Ternary) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *Ternary) Attributes() map[string]interface{} { func (n *Ternary) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package expr package expr
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// UnaryMinus node // UnaryMinus node
type UnaryMinus struct { type UnaryMinus struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Expr node.Node Expr node.Node
} }
@ -29,6 +31,17 @@ func (n *UnaryMinus) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *UnaryMinus) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *UnaryMinus) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *UnaryMinus) Attributes() map[string]interface{} { func (n *UnaryMinus) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package expr package expr
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// UnaryPlus node // UnaryPlus node
type UnaryPlus struct { type UnaryPlus struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Expr node.Node Expr node.Node
} }
@ -29,6 +31,17 @@ func (n *UnaryPlus) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *UnaryPlus) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *UnaryPlus) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *UnaryPlus) Attributes() map[string]interface{} { func (n *UnaryPlus) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package expr package expr
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// Variable node // Variable node
type Variable struct { type Variable struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
VarName node.Node VarName node.Node
} }
@ -29,6 +31,17 @@ func (n *Variable) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *Variable) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *Variable) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *Variable) Attributes() map[string]interface{} { func (n *Variable) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package expr package expr
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// Yield node // Yield node
type Yield struct { type Yield struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Key node.Node Key node.Node
Value node.Node Value node.Node
@ -31,6 +33,17 @@ func (n *Yield) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *Yield) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *Yield) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *Yield) Attributes() map[string]interface{} { func (n *Yield) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package expr package expr
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// YieldFrom node // YieldFrom node
type YieldFrom struct { type YieldFrom struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Expr node.Node Expr node.Node
} }
@ -29,6 +31,17 @@ func (n *YieldFrom) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *YieldFrom) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *YieldFrom) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *YieldFrom) Attributes() map[string]interface{} { func (n *YieldFrom) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,12 +1,14 @@
package node package node
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
) )
// Argument node // Argument node
type Argument struct { type Argument struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Variadic bool // if ... before variable Variadic bool // if ... before variable
IsReference bool // if & before variable IsReference bool // if & before variable
@ -32,6 +34,17 @@ func (n *Argument) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *Argument) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *Argument) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *Argument) Attributes() map[string]interface{} { func (n *Argument) Attributes() map[string]interface{} {
return map[string]interface{}{ return map[string]interface{}{

View File

@ -1,12 +1,14 @@
package node package node
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
) )
// ArgumentList node // ArgumentList node
type ArgumentList struct { type ArgumentList struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Arguments []Node Arguments []Node
} }
@ -28,6 +30,18 @@ func (n *ArgumentList) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *ArgumentList) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *ArgumentList) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *ArgumentList) Attributes() map[string]interface{} { func (n *ArgumentList) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,12 +1,14 @@
package node package node
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
) )
// Identifier node // Identifier node
type Identifier struct { type Identifier struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Value string Value string
} }
@ -28,6 +30,17 @@ func (n *Identifier) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *Identifier) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *Identifier) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *Identifier) Attributes() map[string]interface{} { func (n *Identifier) Attributes() map[string]interface{} {
return map[string]interface{}{ return map[string]interface{}{

View File

@ -1,12 +1,14 @@
package node package node
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
) )
// Nullable node // Nullable node
type Nullable struct { type Nullable struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Expr Node Expr Node
} }
@ -28,6 +30,17 @@ func (n *Nullable) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *Nullable) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *Nullable) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *Nullable) Attributes() map[string]interface{} { func (n *Nullable) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,12 +1,14 @@
package node package node
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
) )
// Parameter node // Parameter node
type Parameter struct { type Parameter struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
ByRef bool ByRef bool
Variadic bool Variadic bool
@ -36,6 +38,17 @@ func (n *Parameter) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *Parameter) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *Parameter) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *Parameter) Attributes() map[string]interface{} { func (n *Parameter) Attributes() map[string]interface{} {
return map[string]interface{}{ return map[string]interface{}{

View File

@ -1,12 +1,14 @@
package node package node
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
) )
// Root node // Root node
type Root struct { type Root struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Stmts []Node Stmts []Node
} }
@ -28,6 +30,17 @@ func (n *Root) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *Root) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *Root) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *Root) Attributes() map[string]interface{} { func (n *Root) Attributes() map[string]interface{} {
return nil return nil

View File

@ -1,6 +1,7 @@
package name package name
import ( import (
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/walker" "github.com/z7zmey/php-parser/walker"
@ -8,6 +9,7 @@ import (
// FullyQualified node // FullyQualified node
type FullyQualified struct { type FullyQualified struct {
Comments []*comment.Comment
Position *position.Position Position *position.Position
Parts []node.Node Parts []node.Node
} }
@ -29,6 +31,17 @@ func (n *FullyQualified) GetPosition() *position.Position {
return n.Position return n.Position
} }
func (n *FullyQualified) AddComments(cc []*comment.Comment, tn comment.TokenName) {
for _, c := range cc {
c.SetTokenName(tn)
}
n.Comments = append(n.Comments, cc...)
}
func (n *FullyQualified) GetComments() []*comment.Comment {
return n.Comments
}
// Attributes returns node attributes as map // Attributes returns node attributes as map
func (n *FullyQualified) Attributes() map[string]interface{} { func (n *FullyQualified) Attributes() map[string]interface{} {
return nil return nil

Some files were not shown because too many files have changed in this diff Show More