#33 comment package has renamed to meta and parser now saves whitespaces
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package binary
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/meta"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
"github.com/z7zmey/php-parser/position"
|
||||
"github.com/z7zmey/php-parser/walker"
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
// BitwiseAnd node
|
||||
type BitwiseAnd struct {
|
||||
Comments []*comment.Comment
|
||||
Meta []meta.Meta
|
||||
Position *position.Position
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
@@ -33,15 +33,12 @@ func (n *BitwiseAnd) GetPosition() *position.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) AddMeta(m []meta.Meta) {
|
||||
n.Meta = append(n.Meta, m...)
|
||||
}
|
||||
|
||||
func (n *BitwiseAnd) GetComments() []*comment.Comment {
|
||||
return n.Comments
|
||||
func (n *BitwiseAnd) GetMeta() []meta.Meta {
|
||||
return n.Meta
|
||||
}
|
||||
|
||||
// Attributes returns node attributes as map
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package binary
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/meta"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
"github.com/z7zmey/php-parser/position"
|
||||
"github.com/z7zmey/php-parser/walker"
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
// BitwiseOr node
|
||||
type BitwiseOr struct {
|
||||
Comments []*comment.Comment
|
||||
Meta []meta.Meta
|
||||
Position *position.Position
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
@@ -33,15 +33,12 @@ func (n *BitwiseOr) GetPosition() *position.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) AddMeta(m []meta.Meta) {
|
||||
n.Meta = append(n.Meta, m...)
|
||||
}
|
||||
|
||||
func (n *BitwiseOr) GetComments() []*comment.Comment {
|
||||
return n.Comments
|
||||
func (n *BitwiseOr) GetMeta() []meta.Meta {
|
||||
return n.Meta
|
||||
}
|
||||
|
||||
// Attributes returns node attributes as map
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package binary
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/meta"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
"github.com/z7zmey/php-parser/position"
|
||||
"github.com/z7zmey/php-parser/walker"
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
// BitwiseXor node
|
||||
type BitwiseXor struct {
|
||||
Comments []*comment.Comment
|
||||
Meta []meta.Meta
|
||||
Position *position.Position
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
@@ -33,15 +33,12 @@ func (n *BitwiseXor) GetPosition() *position.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) AddMeta(m []meta.Meta) {
|
||||
n.Meta = append(n.Meta, m...)
|
||||
}
|
||||
|
||||
func (n *BitwiseXor) GetComments() []*comment.Comment {
|
||||
return n.Comments
|
||||
func (n *BitwiseXor) GetMeta() []meta.Meta {
|
||||
return n.Meta
|
||||
}
|
||||
|
||||
// Attributes returns node attributes as map
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package binary
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/meta"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
"github.com/z7zmey/php-parser/position"
|
||||
"github.com/z7zmey/php-parser/walker"
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
// BooleanAnd node
|
||||
type BooleanAnd struct {
|
||||
Comments []*comment.Comment
|
||||
Meta []meta.Meta
|
||||
Position *position.Position
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
@@ -33,15 +33,12 @@ func (n *BooleanAnd) GetPosition() *position.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) AddMeta(m []meta.Meta) {
|
||||
n.Meta = append(n.Meta, m...)
|
||||
}
|
||||
|
||||
func (n *BooleanAnd) GetComments() []*comment.Comment {
|
||||
return n.Comments
|
||||
func (n *BooleanAnd) GetMeta() []meta.Meta {
|
||||
return n.Meta
|
||||
}
|
||||
|
||||
// Attributes returns node attributes as map
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package binary
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/meta"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
"github.com/z7zmey/php-parser/position"
|
||||
"github.com/z7zmey/php-parser/walker"
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
// BooleanOr node
|
||||
type BooleanOr struct {
|
||||
Comments []*comment.Comment
|
||||
Meta []meta.Meta
|
||||
Position *position.Position
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
@@ -33,15 +33,12 @@ func (n *BooleanOr) GetPosition() *position.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) AddMeta(m []meta.Meta) {
|
||||
n.Meta = append(n.Meta, m...)
|
||||
}
|
||||
|
||||
func (n *BooleanOr) GetComments() []*comment.Comment {
|
||||
return n.Comments
|
||||
func (n *BooleanOr) GetMeta() []meta.Meta {
|
||||
return n.Meta
|
||||
}
|
||||
|
||||
// Attributes returns node attributes as map
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package binary
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/meta"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
"github.com/z7zmey/php-parser/position"
|
||||
"github.com/z7zmey/php-parser/walker"
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
// Coalesce node
|
||||
type Coalesce struct {
|
||||
Comments []*comment.Comment
|
||||
Meta []meta.Meta
|
||||
Position *position.Position
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
@@ -33,15 +33,12 @@ func (n *Coalesce) GetPosition() *position.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) AddMeta(m []meta.Meta) {
|
||||
n.Meta = append(n.Meta, m...)
|
||||
}
|
||||
|
||||
func (n *Coalesce) GetComments() []*comment.Comment {
|
||||
return n.Comments
|
||||
func (n *Coalesce) GetMeta() []meta.Meta {
|
||||
return n.Meta
|
||||
}
|
||||
|
||||
// Attributes returns node attributes as map
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package binary
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/meta"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
"github.com/z7zmey/php-parser/position"
|
||||
"github.com/z7zmey/php-parser/walker"
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
// Concat node
|
||||
type Concat struct {
|
||||
Comments []*comment.Comment
|
||||
Meta []meta.Meta
|
||||
Position *position.Position
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
@@ -33,15 +33,12 @@ func (n *Concat) GetPosition() *position.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) AddMeta(m []meta.Meta) {
|
||||
n.Meta = append(n.Meta, m...)
|
||||
}
|
||||
|
||||
func (n *Concat) GetComments() []*comment.Comment {
|
||||
return n.Comments
|
||||
func (n *Concat) GetMeta() []meta.Meta {
|
||||
return n.Meta
|
||||
}
|
||||
|
||||
// Attributes returns node attributes as map
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package binary
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/meta"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
"github.com/z7zmey/php-parser/position"
|
||||
"github.com/z7zmey/php-parser/walker"
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
// Div node
|
||||
type Div struct {
|
||||
Comments []*comment.Comment
|
||||
Meta []meta.Meta
|
||||
Position *position.Position
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
@@ -33,15 +33,12 @@ func (n *Div) GetPosition() *position.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) AddMeta(m []meta.Meta) {
|
||||
n.Meta = append(n.Meta, m...)
|
||||
}
|
||||
|
||||
func (n *Div) GetComments() []*comment.Comment {
|
||||
return n.Comments
|
||||
func (n *Div) GetMeta() []meta.Meta {
|
||||
return n.Meta
|
||||
}
|
||||
|
||||
// Attributes returns node attributes as map
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package binary
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/meta"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
"github.com/z7zmey/php-parser/position"
|
||||
"github.com/z7zmey/php-parser/walker"
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
// Equal node
|
||||
type Equal struct {
|
||||
Comments []*comment.Comment
|
||||
Meta []meta.Meta
|
||||
Position *position.Position
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
@@ -33,15 +33,12 @@ func (n *Equal) GetPosition() *position.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) AddMeta(m []meta.Meta) {
|
||||
n.Meta = append(n.Meta, m...)
|
||||
}
|
||||
|
||||
func (n *Equal) GetComments() []*comment.Comment {
|
||||
return n.Comments
|
||||
func (n *Equal) GetMeta() []meta.Meta {
|
||||
return n.Meta
|
||||
}
|
||||
|
||||
// Attributes returns node attributes as map
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package binary
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/meta"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
"github.com/z7zmey/php-parser/position"
|
||||
"github.com/z7zmey/php-parser/walker"
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
// Greater node
|
||||
type Greater struct {
|
||||
Comments []*comment.Comment
|
||||
Meta []meta.Meta
|
||||
Position *position.Position
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
@@ -33,15 +33,12 @@ func (n *Greater) GetPosition() *position.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) AddMeta(m []meta.Meta) {
|
||||
n.Meta = append(n.Meta, m...)
|
||||
}
|
||||
|
||||
func (n *Greater) GetComments() []*comment.Comment {
|
||||
return n.Comments
|
||||
func (n *Greater) GetMeta() []meta.Meta {
|
||||
return n.Meta
|
||||
}
|
||||
|
||||
// Attributes returns node attributes as map
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package binary
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/meta"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
"github.com/z7zmey/php-parser/position"
|
||||
"github.com/z7zmey/php-parser/walker"
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
// GreaterOrEqual node
|
||||
type GreaterOrEqual struct {
|
||||
Comments []*comment.Comment
|
||||
Meta []meta.Meta
|
||||
Position *position.Position
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
@@ -33,15 +33,12 @@ func (n *GreaterOrEqual) GetPosition() *position.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) AddMeta(m []meta.Meta) {
|
||||
n.Meta = append(n.Meta, m...)
|
||||
}
|
||||
|
||||
func (n *GreaterOrEqual) GetComments() []*comment.Comment {
|
||||
return n.Comments
|
||||
func (n *GreaterOrEqual) GetMeta() []meta.Meta {
|
||||
return n.Meta
|
||||
}
|
||||
|
||||
// Attributes returns node attributes as map
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package binary
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/meta"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
"github.com/z7zmey/php-parser/position"
|
||||
"github.com/z7zmey/php-parser/walker"
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
// Identical node
|
||||
type Identical struct {
|
||||
Comments []*comment.Comment
|
||||
Meta []meta.Meta
|
||||
Position *position.Position
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
@@ -33,15 +33,12 @@ func (n *Identical) GetPosition() *position.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) AddMeta(m []meta.Meta) {
|
||||
n.Meta = append(n.Meta, m...)
|
||||
}
|
||||
|
||||
func (n *Identical) GetComments() []*comment.Comment {
|
||||
return n.Comments
|
||||
func (n *Identical) GetMeta() []meta.Meta {
|
||||
return n.Meta
|
||||
}
|
||||
|
||||
// Attributes returns node attributes as map
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package binary
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/meta"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
"github.com/z7zmey/php-parser/position"
|
||||
"github.com/z7zmey/php-parser/walker"
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
// LogicalAnd node
|
||||
type LogicalAnd struct {
|
||||
Comments []*comment.Comment
|
||||
Meta []meta.Meta
|
||||
Position *position.Position
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
@@ -33,15 +33,12 @@ func (n *LogicalAnd) GetPosition() *position.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) AddMeta(m []meta.Meta) {
|
||||
n.Meta = append(n.Meta, m...)
|
||||
}
|
||||
|
||||
func (n *LogicalAnd) GetComments() []*comment.Comment {
|
||||
return n.Comments
|
||||
func (n *LogicalAnd) GetMeta() []meta.Meta {
|
||||
return n.Meta
|
||||
}
|
||||
|
||||
// Attributes returns node attributes as map
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package binary
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/meta"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
"github.com/z7zmey/php-parser/position"
|
||||
"github.com/z7zmey/php-parser/walker"
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
// LogicalOr node
|
||||
type LogicalOr struct {
|
||||
Comments []*comment.Comment
|
||||
Meta []meta.Meta
|
||||
Position *position.Position
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
@@ -33,15 +33,12 @@ func (n *LogicalOr) GetPosition() *position.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) AddMeta(m []meta.Meta) {
|
||||
n.Meta = append(n.Meta, m...)
|
||||
}
|
||||
|
||||
func (n *LogicalOr) GetComments() []*comment.Comment {
|
||||
return n.Comments
|
||||
func (n *LogicalOr) GetMeta() []meta.Meta {
|
||||
return n.Meta
|
||||
}
|
||||
|
||||
// Attributes returns node attributes as map
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package binary
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/meta"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
"github.com/z7zmey/php-parser/position"
|
||||
"github.com/z7zmey/php-parser/walker"
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
// LogicalXor node
|
||||
type LogicalXor struct {
|
||||
Comments []*comment.Comment
|
||||
Meta []meta.Meta
|
||||
Position *position.Position
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
@@ -33,15 +33,12 @@ func (n *LogicalXor) GetPosition() *position.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) AddMeta(m []meta.Meta) {
|
||||
n.Meta = append(n.Meta, m...)
|
||||
}
|
||||
|
||||
func (n *LogicalXor) GetComments() []*comment.Comment {
|
||||
return n.Comments
|
||||
func (n *LogicalXor) GetMeta() []meta.Meta {
|
||||
return n.Meta
|
||||
}
|
||||
|
||||
// Attributes returns node attributes as map
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package binary
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/meta"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
"github.com/z7zmey/php-parser/position"
|
||||
"github.com/z7zmey/php-parser/walker"
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
// Minus node
|
||||
type Minus struct {
|
||||
Comments []*comment.Comment
|
||||
Meta []meta.Meta
|
||||
Position *position.Position
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
@@ -33,15 +33,12 @@ func (n *Minus) GetPosition() *position.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) AddMeta(m []meta.Meta) {
|
||||
n.Meta = append(n.Meta, m...)
|
||||
}
|
||||
|
||||
func (n *Minus) GetComments() []*comment.Comment {
|
||||
return n.Comments
|
||||
func (n *Minus) GetMeta() []meta.Meta {
|
||||
return n.Meta
|
||||
}
|
||||
|
||||
// Attributes returns node attributes as map
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package binary
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/meta"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
"github.com/z7zmey/php-parser/position"
|
||||
"github.com/z7zmey/php-parser/walker"
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
// Mod node
|
||||
type Mod struct {
|
||||
Comments []*comment.Comment
|
||||
Meta []meta.Meta
|
||||
Position *position.Position
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
@@ -33,15 +33,12 @@ func (n *Mod) GetPosition() *position.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) AddMeta(m []meta.Meta) {
|
||||
n.Meta = append(n.Meta, m...)
|
||||
}
|
||||
|
||||
func (n *Mod) GetComments() []*comment.Comment {
|
||||
return n.Comments
|
||||
func (n *Mod) GetMeta() []meta.Meta {
|
||||
return n.Meta
|
||||
}
|
||||
|
||||
// Attributes returns node attributes as map
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package binary
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/meta"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
"github.com/z7zmey/php-parser/position"
|
||||
"github.com/z7zmey/php-parser/walker"
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
// Mul node
|
||||
type Mul struct {
|
||||
Comments []*comment.Comment
|
||||
Meta []meta.Meta
|
||||
Position *position.Position
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
@@ -33,15 +33,12 @@ func (n *Mul) GetPosition() *position.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) AddMeta(m []meta.Meta) {
|
||||
n.Meta = append(n.Meta, m...)
|
||||
}
|
||||
|
||||
func (n *Mul) GetComments() []*comment.Comment {
|
||||
return n.Comments
|
||||
func (n *Mul) GetMeta() []meta.Meta {
|
||||
return n.Meta
|
||||
}
|
||||
|
||||
// Attributes returns node attributes as map
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package binary
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/meta"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
"github.com/z7zmey/php-parser/position"
|
||||
"github.com/z7zmey/php-parser/walker"
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
// NotEqual node
|
||||
type NotEqual struct {
|
||||
Comments []*comment.Comment
|
||||
Meta []meta.Meta
|
||||
Position *position.Position
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
@@ -33,15 +33,12 @@ func (n *NotEqual) GetPosition() *position.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) AddMeta(m []meta.Meta) {
|
||||
n.Meta = append(n.Meta, m...)
|
||||
}
|
||||
|
||||
func (n *NotEqual) GetComments() []*comment.Comment {
|
||||
return n.Comments
|
||||
func (n *NotEqual) GetMeta() []meta.Meta {
|
||||
return n.Meta
|
||||
}
|
||||
|
||||
// Attributes returns node attributes as map
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package binary
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/meta"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
"github.com/z7zmey/php-parser/position"
|
||||
"github.com/z7zmey/php-parser/walker"
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
// NotIdentical node
|
||||
type NotIdentical struct {
|
||||
Comments []*comment.Comment
|
||||
Meta []meta.Meta
|
||||
Position *position.Position
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
@@ -33,15 +33,12 @@ func (n *NotIdentical) GetPosition() *position.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) AddMeta(m []meta.Meta) {
|
||||
n.Meta = append(n.Meta, m...)
|
||||
}
|
||||
|
||||
func (n *NotIdentical) GetComments() []*comment.Comment {
|
||||
return n.Comments
|
||||
func (n *NotIdentical) GetMeta() []meta.Meta {
|
||||
return n.Meta
|
||||
}
|
||||
|
||||
// Attributes returns node attributes as map
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package binary
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/meta"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
"github.com/z7zmey/php-parser/position"
|
||||
"github.com/z7zmey/php-parser/walker"
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
// Plus node
|
||||
type Plus struct {
|
||||
Comments []*comment.Comment
|
||||
Meta []meta.Meta
|
||||
Position *position.Position
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
@@ -33,15 +33,12 @@ func (n *Plus) GetPosition() *position.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) AddMeta(m []meta.Meta) {
|
||||
n.Meta = append(n.Meta, m...)
|
||||
}
|
||||
|
||||
func (n *Plus) GetComments() []*comment.Comment {
|
||||
return n.Comments
|
||||
func (n *Plus) GetMeta() []meta.Meta {
|
||||
return n.Meta
|
||||
}
|
||||
|
||||
// Attributes returns node attributes as map
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package binary
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/meta"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
"github.com/z7zmey/php-parser/position"
|
||||
"github.com/z7zmey/php-parser/walker"
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
// Pow node
|
||||
type Pow struct {
|
||||
Comments []*comment.Comment
|
||||
Meta []meta.Meta
|
||||
Position *position.Position
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
@@ -33,15 +33,12 @@ func (n *Pow) GetPosition() *position.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) AddMeta(m []meta.Meta) {
|
||||
n.Meta = append(n.Meta, m...)
|
||||
}
|
||||
|
||||
func (n *Pow) GetComments() []*comment.Comment {
|
||||
return n.Comments
|
||||
func (n *Pow) GetMeta() []meta.Meta {
|
||||
return n.Meta
|
||||
}
|
||||
|
||||
// Attributes returns node attributes as map
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package binary
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/meta"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
"github.com/z7zmey/php-parser/position"
|
||||
"github.com/z7zmey/php-parser/walker"
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
// ShiftLeft node
|
||||
type ShiftLeft struct {
|
||||
Comments []*comment.Comment
|
||||
Meta []meta.Meta
|
||||
Position *position.Position
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
@@ -33,15 +33,12 @@ func (n *ShiftLeft) GetPosition() *position.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) AddMeta(m []meta.Meta) {
|
||||
n.Meta = append(n.Meta, m...)
|
||||
}
|
||||
|
||||
func (n *ShiftLeft) GetComments() []*comment.Comment {
|
||||
return n.Comments
|
||||
func (n *ShiftLeft) GetMeta() []meta.Meta {
|
||||
return n.Meta
|
||||
}
|
||||
|
||||
// Attributes returns node attributes as map
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package binary
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/meta"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
"github.com/z7zmey/php-parser/position"
|
||||
"github.com/z7zmey/php-parser/walker"
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
// ShiftRight node
|
||||
type ShiftRight struct {
|
||||
Comments []*comment.Comment
|
||||
Meta []meta.Meta
|
||||
Position *position.Position
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
@@ -33,15 +33,12 @@ func (n *ShiftRight) GetPosition() *position.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) AddMeta(m []meta.Meta) {
|
||||
n.Meta = append(n.Meta, m...)
|
||||
}
|
||||
|
||||
func (n *ShiftRight) GetComments() []*comment.Comment {
|
||||
return n.Comments
|
||||
func (n *ShiftRight) GetMeta() []meta.Meta {
|
||||
return n.Meta
|
||||
}
|
||||
|
||||
// Attributes returns node attributes as map
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package binary
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/meta"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
"github.com/z7zmey/php-parser/position"
|
||||
"github.com/z7zmey/php-parser/walker"
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
// Smaller node
|
||||
type Smaller struct {
|
||||
Comments []*comment.Comment
|
||||
Meta []meta.Meta
|
||||
Position *position.Position
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
@@ -33,15 +33,12 @@ func (n *Smaller) GetPosition() *position.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) AddMeta(m []meta.Meta) {
|
||||
n.Meta = append(n.Meta, m...)
|
||||
}
|
||||
|
||||
func (n *Smaller) GetComments() []*comment.Comment {
|
||||
return n.Comments
|
||||
func (n *Smaller) GetMeta() []meta.Meta {
|
||||
return n.Meta
|
||||
}
|
||||
|
||||
// Attributes returns node attributes as map
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package binary
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/meta"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
"github.com/z7zmey/php-parser/position"
|
||||
"github.com/z7zmey/php-parser/walker"
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
// SmallerOrEqual node
|
||||
type SmallerOrEqual struct {
|
||||
Comments []*comment.Comment
|
||||
Meta []meta.Meta
|
||||
Position *position.Position
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
@@ -33,15 +33,12 @@ func (n *SmallerOrEqual) GetPosition() *position.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) AddMeta(m []meta.Meta) {
|
||||
n.Meta = append(n.Meta, m...)
|
||||
}
|
||||
|
||||
func (n *SmallerOrEqual) GetComments() []*comment.Comment {
|
||||
return n.Comments
|
||||
func (n *SmallerOrEqual) GetMeta() []meta.Meta {
|
||||
return n.Meta
|
||||
}
|
||||
|
||||
// Attributes returns node attributes as map
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package binary
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/meta"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
"github.com/z7zmey/php-parser/position"
|
||||
"github.com/z7zmey/php-parser/walker"
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
// Spaceship node
|
||||
type Spaceship struct {
|
||||
Comments []*comment.Comment
|
||||
Meta []meta.Meta
|
||||
Position *position.Position
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
@@ -33,15 +33,12 @@ func (n *Spaceship) GetPosition() *position.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) AddMeta(m []meta.Meta) {
|
||||
n.Meta = append(n.Meta, m...)
|
||||
}
|
||||
|
||||
func (n *Spaceship) GetComments() []*comment.Comment {
|
||||
return n.Comments
|
||||
func (n *Spaceship) GetMeta() []meta.Meta {
|
||||
return n.Meta
|
||||
}
|
||||
|
||||
// Attributes returns node attributes as map
|
||||
|
||||
Reference in New Issue
Block a user