fix comments pointers

This commit is contained in:
z7zmey 2018-01-08 21:50:39 +02:00
parent 4ecb9edbd8
commit b7b859edaa
163 changed files with 426 additions and 430 deletions

View File

@ -4,7 +4,7 @@ type DocComment struct {
value string value string
} }
func NewDocComment(value string) Comment { func NewDocComment(value string) *DocComment {
return &DocComment{ return &DocComment{
value, value,
} }

View File

@ -4,7 +4,7 @@ type PlainComment struct {
value string value string
} }
func NewPlainComment(value string) Comment { func NewPlainComment(value string) *PlainComment {
return &PlainComment{ return &PlainComment{
value, value,
} }

View File

@ -22,9 +22,9 @@ func (d dumper) EnterNode(n node.Node) bool {
} }
fmt.Println() fmt.Println()
if c := n.Comments(); c != nil && len(*c) > 0 { if c := n.Comments(); c != nil && len(c) > 0 {
fmt.Printf("%vcomments:\n", d.indent+" ") fmt.Printf("%vcomments:\n", d.indent+" ")
for _, cc := range *c { for _, cc := range c {
fmt.Printf("%v%q\n", d.indent+" ", cc) fmt.Printf("%v%q\n", d.indent+" ", cc)
} }
} }

View File

@ -4,7 +4,7 @@ import "github.com/z7zmey/php-parser/comment"
type Argument struct { type Argument struct {
position *Position position *Position
comments *[]comment.Comment comments []comment.Comment
Variadic bool Variadic bool
Expr Node Expr Node
} }
@ -33,11 +33,11 @@ func (n *Argument) SetPosition(p *Position) Node {
return n return n
} }
func (n *Argument) Comments() *[]comment.Comment { func (n *Argument) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *Argument) SetComments(c *[]comment.Comment) Node { func (n *Argument) SetComments(c []comment.Comment) Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -7,7 +7,7 @@ import (
type Array struct { type Array struct {
position *node.Position position *node.Position
comments *[]comment.Comment comments []comment.Comment
Items []node.Node Items []node.Node
} }
@ -32,11 +32,11 @@ func (n *Array) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *Array) Comments() *[]comment.Comment { func (n *Array) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *Array) SetComments(c *[]comment.Comment) node.Node { func (n *Array) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -7,7 +7,7 @@ import (
type ArrayDimFetch struct { type ArrayDimFetch struct {
position *node.Position position *node.Position
comments *[]comment.Comment comments []comment.Comment
Variable node.Node Variable node.Node
Dim node.Node Dim node.Node
} }
@ -34,11 +34,11 @@ func (n *ArrayDimFetch) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *ArrayDimFetch) Comments() *[]comment.Comment { func (n *ArrayDimFetch) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *ArrayDimFetch) SetComments(c *[]comment.Comment) node.Node { func (n *ArrayDimFetch) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -7,7 +7,7 @@ import (
type ArrayItem struct { type ArrayItem struct {
position *node.Position position *node.Position
comments *[]comment.Comment comments []comment.Comment
ByRef bool ByRef bool
Key node.Node Key node.Node
Val node.Node Val node.Node
@ -38,11 +38,11 @@ func (n *ArrayItem) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *ArrayItem) Comments() *[]comment.Comment { func (n *ArrayItem) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *ArrayItem) SetComments(c *[]comment.Comment) node.Node { func (n *ArrayItem) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -33,11 +33,11 @@ func (n *Assign) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *Assign) Comments() *[]comment.Comment { func (n *Assign) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *Assign) SetComments(c *[]comment.Comment) node.Node { func (n *Assign) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -7,7 +7,7 @@ import (
type AssignOp struct { type AssignOp struct {
position *node.Position position *node.Position
comments *[]comment.Comment comments []comment.Comment
Variable node.Node Variable node.Node
Expression node.Node Expression node.Node
} }

View File

@ -33,11 +33,11 @@ func (n *AssignRef) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *AssignRef) Comments() *[]comment.Comment { func (n *AssignRef) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *AssignRef) SetComments(c *[]comment.Comment) node.Node { func (n *AssignRef) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -33,11 +33,11 @@ func (n *BitwiseAnd) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *BitwiseAnd) Comments() *[]comment.Comment { func (n *BitwiseAnd) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *BitwiseAnd) SetComments(c *[]comment.Comment) node.Node { func (n *BitwiseAnd) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -33,11 +33,11 @@ func (n *BitwiseOr) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *BitwiseOr) Comments() *[]comment.Comment { func (n *BitwiseOr) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *BitwiseOr) SetComments(c *[]comment.Comment) node.Node { func (n *BitwiseOr) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -33,11 +33,11 @@ func (n *BitwiseXor) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *BitwiseXor) Comments() *[]comment.Comment { func (n *BitwiseXor) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *BitwiseXor) SetComments(c *[]comment.Comment) node.Node { func (n *BitwiseXor) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -33,11 +33,11 @@ func (n *Concat) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *Concat) Comments() *[]comment.Comment { func (n *Concat) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *Concat) SetComments(c *[]comment.Comment) node.Node { func (n *Concat) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -33,11 +33,11 @@ func (n *Div) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *Div) Comments() *[]comment.Comment { func (n *Div) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *Div) SetComments(c *[]comment.Comment) node.Node { func (n *Div) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -33,11 +33,11 @@ func (n *Minus) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *Minus) Comments() *[]comment.Comment { func (n *Minus) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *Minus) SetComments(c *[]comment.Comment) node.Node { func (n *Minus) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -33,11 +33,11 @@ func (n *Mod) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *Mod) Comments() *[]comment.Comment { func (n *Mod) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *Mod) SetComments(c *[]comment.Comment) node.Node { func (n *Mod) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -33,11 +33,11 @@ func (n *Mul) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *Mul) Comments() *[]comment.Comment { func (n *Mul) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *Mul) SetComments(c *[]comment.Comment) node.Node { func (n *Mul) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -33,11 +33,11 @@ func (n *Plus) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *Plus) Comments() *[]comment.Comment { func (n *Plus) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *Plus) SetComments(c *[]comment.Comment) node.Node { func (n *Plus) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -33,11 +33,11 @@ func (n *Pow) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *Pow) Comments() *[]comment.Comment { func (n *Pow) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *Pow) SetComments(c *[]comment.Comment) node.Node { func (n *Pow) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -33,11 +33,11 @@ func (n *ShiftLeft) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *ShiftLeft) Comments() *[]comment.Comment { func (n *ShiftLeft) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *ShiftLeft) SetComments(c *[]comment.Comment) node.Node { func (n *ShiftLeft) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -33,11 +33,11 @@ func (n *ShiftRight) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *ShiftRight) Comments() *[]comment.Comment { func (n *ShiftRight) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *ShiftRight) SetComments(c *[]comment.Comment) node.Node { func (n *ShiftRight) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -7,7 +7,7 @@ import (
type BinaryOp struct { type BinaryOp struct {
position *node.Position position *node.Position
comments *[]comment.Comment comments []comment.Comment
Left node.Node Left node.Node
Right node.Node Right node.Node
} }

View File

@ -33,11 +33,11 @@ func (n *BitwiseAnd) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *BitwiseAnd) Comments() *[]comment.Comment { func (n *BitwiseAnd) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *BitwiseAnd) SetComments(c *[]comment.Comment) node.Node { func (n *BitwiseAnd) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -33,11 +33,11 @@ func (n *BitwiseOr) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *BitwiseOr) Comments() *[]comment.Comment { func (n *BitwiseOr) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *BitwiseOr) SetComments(c *[]comment.Comment) node.Node { func (n *BitwiseOr) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -33,11 +33,11 @@ func (n *BitwiseXor) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *BitwiseXor) Comments() *[]comment.Comment { func (n *BitwiseXor) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *BitwiseXor) SetComments(c *[]comment.Comment) node.Node { func (n *BitwiseXor) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -33,11 +33,11 @@ func (n *BooleanAnd) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *BooleanAnd) Comments() *[]comment.Comment { func (n *BooleanAnd) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *BooleanAnd) SetComments(c *[]comment.Comment) node.Node { func (n *BooleanAnd) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -33,11 +33,11 @@ func (n *BooleanOr) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *BooleanOr) Comments() *[]comment.Comment { func (n *BooleanOr) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *BooleanOr) SetComments(c *[]comment.Comment) node.Node { func (n *BooleanOr) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -33,11 +33,11 @@ func (n *Coalesce) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *Coalesce) Comments() *[]comment.Comment { func (n *Coalesce) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *Coalesce) SetComments(c *[]comment.Comment) node.Node { func (n *Coalesce) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -33,11 +33,11 @@ func (n *Concat) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *Concat) Comments() *[]comment.Comment { func (n *Concat) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *Concat) SetComments(c *[]comment.Comment) node.Node { func (n *Concat) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -33,11 +33,11 @@ func (n *Div) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *Div) Comments() *[]comment.Comment { func (n *Div) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *Div) SetComments(c *[]comment.Comment) node.Node { func (n *Div) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -33,11 +33,11 @@ func (n *Equal) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *Equal) Comments() *[]comment.Comment { func (n *Equal) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *Equal) SetComments(c *[]comment.Comment) node.Node { func (n *Equal) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -33,11 +33,11 @@ func (n *Greater) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *Greater) Comments() *[]comment.Comment { func (n *Greater) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *Greater) SetComments(c *[]comment.Comment) node.Node { func (n *Greater) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -33,11 +33,11 @@ func (n *GreaterOrEqual) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *GreaterOrEqual) Comments() *[]comment.Comment { func (n *GreaterOrEqual) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *GreaterOrEqual) SetComments(c *[]comment.Comment) node.Node { func (n *GreaterOrEqual) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -33,11 +33,11 @@ func (n *Identical) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *Identical) Comments() *[]comment.Comment { func (n *Identical) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *Identical) SetComments(c *[]comment.Comment) node.Node { func (n *Identical) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -33,11 +33,11 @@ func (n *LogicalAnd) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *LogicalAnd) Comments() *[]comment.Comment { func (n *LogicalAnd) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *LogicalAnd) SetComments(c *[]comment.Comment) node.Node { func (n *LogicalAnd) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -33,11 +33,11 @@ func (n *LogicalOr) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *LogicalOr) Comments() *[]comment.Comment { func (n *LogicalOr) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *LogicalOr) SetComments(c *[]comment.Comment) node.Node { func (n *LogicalOr) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -33,11 +33,11 @@ func (n *LogicalXor) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *LogicalXor) Comments() *[]comment.Comment { func (n *LogicalXor) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *LogicalXor) SetComments(c *[]comment.Comment) node.Node { func (n *LogicalXor) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -33,11 +33,11 @@ func (n *Minus) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *Minus) Comments() *[]comment.Comment { func (n *Minus) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *Minus) SetComments(c *[]comment.Comment) node.Node { func (n *Minus) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -33,11 +33,11 @@ func (n *Mod) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *Mod) Comments() *[]comment.Comment { func (n *Mod) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *Mod) SetComments(c *[]comment.Comment) node.Node { func (n *Mod) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -33,11 +33,11 @@ func (n *Mul) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *Mul) Comments() *[]comment.Comment { func (n *Mul) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *Mul) SetComments(c *[]comment.Comment) node.Node { func (n *Mul) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -33,11 +33,11 @@ func (n *NotEqual) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *NotEqual) Comments() *[]comment.Comment { func (n *NotEqual) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *NotEqual) SetComments(c *[]comment.Comment) node.Node { func (n *NotEqual) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -33,11 +33,11 @@ func (n *NotIdentical) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *NotIdentical) Comments() *[]comment.Comment { func (n *NotIdentical) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *NotIdentical) SetComments(c *[]comment.Comment) node.Node { func (n *NotIdentical) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -33,11 +33,11 @@ func (n *Plus) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *Plus) Comments() *[]comment.Comment { func (n *Plus) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *Plus) SetComments(c *[]comment.Comment) node.Node { func (n *Plus) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -33,11 +33,11 @@ func (n *Pow) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *Pow) Comments() *[]comment.Comment { func (n *Pow) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *Pow) SetComments(c *[]comment.Comment) node.Node { func (n *Pow) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -33,11 +33,11 @@ func (n *ShiftLeft) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *ShiftLeft) Comments() *[]comment.Comment { func (n *ShiftLeft) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *ShiftLeft) SetComments(c *[]comment.Comment) node.Node { func (n *ShiftLeft) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -33,11 +33,11 @@ func (n *ShiftRight) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *ShiftRight) Comments() *[]comment.Comment { func (n *ShiftRight) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *ShiftRight) SetComments(c *[]comment.Comment) node.Node { func (n *ShiftRight) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -33,11 +33,11 @@ func (n *Smaller) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *Smaller) Comments() *[]comment.Comment { func (n *Smaller) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *Smaller) SetComments(c *[]comment.Comment) node.Node { func (n *Smaller) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -33,11 +33,11 @@ func (n *SmallerOrEqual) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *SmallerOrEqual) Comments() *[]comment.Comment { func (n *SmallerOrEqual) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *SmallerOrEqual) SetComments(c *[]comment.Comment) node.Node { func (n *SmallerOrEqual) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -33,11 +33,11 @@ func (n *Spaceship) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *Spaceship) Comments() *[]comment.Comment { func (n *Spaceship) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *Spaceship) SetComments(c *[]comment.Comment) node.Node { func (n *Spaceship) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -7,7 +7,7 @@ import (
type BitwiseNot struct { type BitwiseNot struct {
position *node.Position position *node.Position
comments *[]comment.Comment comments []comment.Comment
Expr node.Node Expr node.Node
} }
@ -32,11 +32,11 @@ func (n *BitwiseNot) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *BitwiseNot) Comments() *[]comment.Comment { func (n *BitwiseNot) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *BitwiseNot) SetComments(c *[]comment.Comment) node.Node { func (n *BitwiseNot) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -7,7 +7,7 @@ import (
type BooleanNot struct { type BooleanNot struct {
position *node.Position position *node.Position
comments *[]comment.Comment comments []comment.Comment
Expr node.Node Expr node.Node
} }
@ -32,11 +32,11 @@ func (n *BooleanNot) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *BooleanNot) Comments() *[]comment.Comment { func (n *BooleanNot) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *BooleanNot) SetComments(c *[]comment.Comment) node.Node { func (n *BooleanNot) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -7,6 +7,6 @@ import (
type Cast struct { type Cast struct {
position *node.Position position *node.Position
comments *[]comment.Comment comments []comment.Comment
Expr node.Node Expr node.Node
} }

View File

@ -32,11 +32,11 @@ func (n *CastArray) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *CastArray) Comments() *[]comment.Comment { func (n *CastArray) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *CastArray) SetComments(c *[]comment.Comment) node.Node { func (n *CastArray) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -32,11 +32,11 @@ func (n *CastBool) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *CastBool) Comments() *[]comment.Comment { func (n *CastBool) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *CastBool) SetComments(c *[]comment.Comment) node.Node { func (n *CastBool) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -32,11 +32,11 @@ func (n *CastDouble) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *CastDouble) Comments() *[]comment.Comment { func (n *CastDouble) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *CastDouble) SetComments(c *[]comment.Comment) node.Node { func (n *CastDouble) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -32,11 +32,11 @@ func (n *CastInt) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *CastInt) Comments() *[]comment.Comment { func (n *CastInt) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *CastInt) SetComments(c *[]comment.Comment) node.Node { func (n *CastInt) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -32,11 +32,11 @@ func (n *CastObject) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *CastObject) Comments() *[]comment.Comment { func (n *CastObject) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *CastObject) SetComments(c *[]comment.Comment) node.Node { func (n *CastObject) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -32,11 +32,11 @@ func (n *CastString) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *CastString) Comments() *[]comment.Comment { func (n *CastString) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *CastString) SetComments(c *[]comment.Comment) node.Node { func (n *CastString) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -32,11 +32,11 @@ func (n *CastUnset) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *CastUnset) Comments() *[]comment.Comment { func (n *CastUnset) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *CastUnset) SetComments(c *[]comment.Comment) node.Node { func (n *CastUnset) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -7,7 +7,7 @@ import (
type ClassConstFetch struct { type ClassConstFetch struct {
position *node.Position position *node.Position
comments *[]comment.Comment comments []comment.Comment
Class node.Node Class node.Node
ConstantName node.Node ConstantName node.Node
} }
@ -34,11 +34,11 @@ func (n *ClassConstFetch) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *ClassConstFetch) Comments() *[]comment.Comment { func (n *ClassConstFetch) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *ClassConstFetch) SetComments(c *[]comment.Comment) node.Node { func (n *ClassConstFetch) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -7,7 +7,7 @@ import (
type Clone struct { type Clone struct {
position *node.Position position *node.Position
comments *[]comment.Comment comments []comment.Comment
Expr node.Node Expr node.Node
} }
@ -32,11 +32,11 @@ func (n *Clone) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *Clone) Comments() *[]comment.Comment { func (n *Clone) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *Clone) SetComments(c *[]comment.Comment) node.Node { func (n *Clone) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -7,7 +7,7 @@ import (
type Closure struct { type Closure struct {
position *node.Position position *node.Position
comments *[]comment.Comment comments []comment.Comment
ReturnsRef bool ReturnsRef bool
Static bool Static bool
PhpDocComment string PhpDocComment string
@ -48,11 +48,11 @@ func (n *Closure) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *Closure) Comments() *[]comment.Comment { func (n *Closure) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *Closure) SetComments(c *[]comment.Comment) node.Node { func (n *Closure) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -7,7 +7,7 @@ import (
type ClusureUse struct { type ClusureUse struct {
position *node.Position position *node.Position
comments *[]comment.Comment comments []comment.Comment
ByRef bool ByRef bool
Variable node.Node Variable node.Node
} }
@ -36,11 +36,11 @@ func (n *ClusureUse) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *ClusureUse) Comments() *[]comment.Comment { func (n *ClusureUse) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *ClusureUse) SetComments(c *[]comment.Comment) node.Node { func (n *ClusureUse) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -7,7 +7,7 @@ import (
type ConstFetch struct { type ConstFetch struct {
position *node.Position position *node.Position
comments *[]comment.Comment comments []comment.Comment
Constant node.Node Constant node.Node
} }
@ -32,11 +32,11 @@ func (n *ConstFetch) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *ConstFetch) Comments() *[]comment.Comment { func (n *ConstFetch) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *ConstFetch) SetComments(c *[]comment.Comment) node.Node { func (n *ConstFetch) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -7,7 +7,7 @@ import (
type Empty struct { type Empty struct {
position *node.Position position *node.Position
comments *[]comment.Comment comments []comment.Comment
Expr node.Node Expr node.Node
} }
@ -32,11 +32,11 @@ func (n *Empty) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *Empty) Comments() *[]comment.Comment { func (n *Empty) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *Empty) SetComments(c *[]comment.Comment) node.Node { func (n *Empty) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -7,7 +7,7 @@ import (
type ErrorSuppress struct { type ErrorSuppress struct {
position *node.Position position *node.Position
comments *[]comment.Comment comments []comment.Comment
Expr node.Node Expr node.Node
} }
@ -32,11 +32,11 @@ func (n *ErrorSuppress) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *ErrorSuppress) Comments() *[]comment.Comment { func (n *ErrorSuppress) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *ErrorSuppress) SetComments(c *[]comment.Comment) node.Node { func (n *ErrorSuppress) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -7,7 +7,7 @@ import (
type Eval struct { type Eval struct {
position *node.Position position *node.Position
comments *[]comment.Comment comments []comment.Comment
Expr node.Node Expr node.Node
} }
@ -32,11 +32,11 @@ func (n *Eval) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *Eval) Comments() *[]comment.Comment { func (n *Eval) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *Eval) SetComments(c *[]comment.Comment) node.Node { func (n *Eval) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -7,7 +7,7 @@ import (
type Exit struct { type Exit struct {
position *node.Position position *node.Position
comments *[]comment.Comment comments []comment.Comment
Expr node.Node Expr node.Node
IsDie bool IsDie bool
} }
@ -36,11 +36,11 @@ func (n *Exit) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *Exit) Comments() *[]comment.Comment { func (n *Exit) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *Exit) SetComments(c *[]comment.Comment) node.Node { func (n *Exit) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -7,7 +7,7 @@ import (
type FunctionCall struct { type FunctionCall struct {
position *node.Position position *node.Position
comments *[]comment.Comment comments []comment.Comment
Function node.Node Function node.Node
Arguments []node.Node Arguments []node.Node
} }
@ -34,11 +34,11 @@ func (n *FunctionCall) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *FunctionCall) Comments() *[]comment.Comment { func (n *FunctionCall) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *FunctionCall) SetComments(c *[]comment.Comment) node.Node { func (n *FunctionCall) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -7,7 +7,7 @@ import (
type Include struct { type Include struct {
position *node.Position position *node.Position
comments *[]comment.Comment comments []comment.Comment
Expr node.Node Expr node.Node
} }
@ -32,11 +32,11 @@ func (n *Include) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *Include) Comments() *[]comment.Comment { func (n *Include) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *Include) SetComments(c *[]comment.Comment) node.Node { func (n *Include) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -7,7 +7,7 @@ import (
type IncludeOnce struct { type IncludeOnce struct {
position *node.Position position *node.Position
comments *[]comment.Comment comments []comment.Comment
Expr node.Node Expr node.Node
} }
@ -32,11 +32,11 @@ func (n *IncludeOnce) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *IncludeOnce) Comments() *[]comment.Comment { func (n *IncludeOnce) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *IncludeOnce) SetComments(c *[]comment.Comment) node.Node { func (n *IncludeOnce) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -7,7 +7,7 @@ import (
type InstanceOf struct { type InstanceOf struct {
position *node.Position position *node.Position
comments *[]comment.Comment comments []comment.Comment
Expr node.Node Expr node.Node
Class node.Node Class node.Node
} }
@ -34,11 +34,11 @@ func (n *InstanceOf) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *InstanceOf) Comments() *[]comment.Comment { func (n *InstanceOf) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *InstanceOf) SetComments(c *[]comment.Comment) node.Node { func (n *InstanceOf) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -7,7 +7,7 @@ import (
type Isset struct { type Isset struct {
position *node.Position position *node.Position
comments *[]comment.Comment comments []comment.Comment
Variables []node.Node Variables []node.Node
} }
@ -32,11 +32,11 @@ func (n *Isset) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *Isset) Comments() *[]comment.Comment { func (n *Isset) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *Isset) SetComments(c *[]comment.Comment) node.Node { func (n *Isset) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -7,7 +7,7 @@ import (
type List struct { type List struct {
position *node.Position position *node.Position
comments *[]comment.Comment comments []comment.Comment
Items []node.Node Items []node.Node
} }
@ -32,11 +32,11 @@ func (n *List) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *List) Comments() *[]comment.Comment { func (n *List) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *List) SetComments(c *[]comment.Comment) node.Node { func (n *List) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -7,7 +7,7 @@ import (
type MethodCall struct { type MethodCall struct {
position *node.Position position *node.Position
comments *[]comment.Comment comments []comment.Comment
Variable node.Node Variable node.Node
Method node.Node Method node.Node
Arguments []node.Node Arguments []node.Node
@ -36,11 +36,11 @@ func (n *MethodCall) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *MethodCall) Comments() *[]comment.Comment { func (n *MethodCall) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *MethodCall) SetComments(c *[]comment.Comment) node.Node { func (n *MethodCall) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -7,7 +7,7 @@ import (
type New struct { type New struct {
position *node.Position position *node.Position
comments *[]comment.Comment comments []comment.Comment
Class node.Node Class node.Node
Arguments []node.Node Arguments []node.Node
} }
@ -34,11 +34,11 @@ func (n *New) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *New) Comments() *[]comment.Comment { func (n *New) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *New) SetComments(c *[]comment.Comment) node.Node { func (n *New) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -7,7 +7,7 @@ import (
type PostDec struct { type PostDec struct {
position *node.Position position *node.Position
comments *[]comment.Comment comments []comment.Comment
Variable node.Node Variable node.Node
} }
@ -32,11 +32,11 @@ func (n *PostDec) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *PostDec) Comments() *[]comment.Comment { func (n *PostDec) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *PostDec) SetComments(c *[]comment.Comment) node.Node { func (n *PostDec) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -7,7 +7,7 @@ import (
type PostInc struct { type PostInc struct {
position *node.Position position *node.Position
comments *[]comment.Comment comments []comment.Comment
Variable node.Node Variable node.Node
} }
@ -32,11 +32,11 @@ func (n *PostInc) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *PostInc) Comments() *[]comment.Comment { func (n *PostInc) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *PostInc) SetComments(c *[]comment.Comment) node.Node { func (n *PostInc) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -7,7 +7,7 @@ import (
type PreDec struct { type PreDec struct {
position *node.Position position *node.Position
comments *[]comment.Comment comments []comment.Comment
Variable node.Node Variable node.Node
} }
@ -32,11 +32,11 @@ func (n *PreDec) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *PreDec) Comments() *[]comment.Comment { func (n *PreDec) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *PreDec) SetComments(c *[]comment.Comment) node.Node { func (n *PreDec) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -7,7 +7,7 @@ import (
type PreInc struct { type PreInc struct {
position *node.Position position *node.Position
comments *[]comment.Comment comments []comment.Comment
Variable node.Node Variable node.Node
} }
@ -32,11 +32,11 @@ func (n *PreInc) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *PreInc) Comments() *[]comment.Comment { func (n *PreInc) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *PreInc) SetComments(c *[]comment.Comment) node.Node { func (n *PreInc) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -7,7 +7,7 @@ import (
type Print struct { type Print struct {
position *node.Position position *node.Position
comments *[]comment.Comment comments []comment.Comment
Expr node.Node Expr node.Node
} }
@ -32,11 +32,11 @@ func (n *Print) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *Print) Comments() *[]comment.Comment { func (n *Print) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *Print) SetComments(c *[]comment.Comment) node.Node { func (n *Print) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -7,7 +7,7 @@ import (
type PropertyFetch struct { type PropertyFetch struct {
position *node.Position position *node.Position
comments *[]comment.Comment comments []comment.Comment
Variable node.Node Variable node.Node
Property node.Node Property node.Node
} }
@ -34,11 +34,11 @@ func (n *PropertyFetch) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *PropertyFetch) Comments() *[]comment.Comment { func (n *PropertyFetch) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *PropertyFetch) SetComments(c *[]comment.Comment) node.Node { func (n *PropertyFetch) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -7,7 +7,7 @@ import (
type Require struct { type Require struct {
position *node.Position position *node.Position
comments *[]comment.Comment comments []comment.Comment
Expr node.Node Expr node.Node
} }
@ -32,11 +32,11 @@ func (n *Require) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *Require) Comments() *[]comment.Comment { func (n *Require) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *Require) SetComments(c *[]comment.Comment) node.Node { func (n *Require) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -7,7 +7,7 @@ import (
type RequireOnce struct { type RequireOnce struct {
position *node.Position position *node.Position
comments *[]comment.Comment comments []comment.Comment
Expr node.Node Expr node.Node
} }
@ -32,11 +32,11 @@ func (n *RequireOnce) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *RequireOnce) Comments() *[]comment.Comment { func (n *RequireOnce) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *RequireOnce) SetComments(c *[]comment.Comment) node.Node { func (n *RequireOnce) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -7,7 +7,7 @@ import (
type ShellExec struct { type ShellExec struct {
position *node.Position position *node.Position
comments *[]comment.Comment comments []comment.Comment
Parts []node.Node Parts []node.Node
} }
@ -32,11 +32,11 @@ func (n *ShellExec) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *ShellExec) Comments() *[]comment.Comment { func (n *ShellExec) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *ShellExec) SetComments(c *[]comment.Comment) node.Node { func (n *ShellExec) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -7,7 +7,7 @@ import (
type ShortArray struct { type ShortArray struct {
position *node.Position position *node.Position
comments *[]comment.Comment comments []comment.Comment
Items []node.Node Items []node.Node
} }
@ -32,11 +32,11 @@ func (n *ShortArray) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *ShortArray) Comments() *[]comment.Comment { func (n *ShortArray) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *ShortArray) SetComments(c *[]comment.Comment) node.Node { func (n *ShortArray) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -7,7 +7,7 @@ import (
type ShortList struct { type ShortList struct {
position *node.Position position *node.Position
comments *[]comment.Comment comments []comment.Comment
Items []node.Node Items []node.Node
} }
@ -32,11 +32,11 @@ func (n *ShortList) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *ShortList) Comments() *[]comment.Comment { func (n *ShortList) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *ShortList) SetComments(c *[]comment.Comment) node.Node { func (n *ShortList) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -7,7 +7,7 @@ import (
type StaticCall struct { type StaticCall struct {
position *node.Position position *node.Position
comments *[]comment.Comment comments []comment.Comment
Class node.Node Class node.Node
Call node.Node Call node.Node
Arguments []node.Node Arguments []node.Node
@ -36,11 +36,11 @@ func (n *StaticCall) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *StaticCall) Comments() *[]comment.Comment { func (n *StaticCall) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *StaticCall) SetComments(c *[]comment.Comment) node.Node { func (n *StaticCall) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -7,7 +7,7 @@ import (
type StaticPropertyFetch struct { type StaticPropertyFetch struct {
position *node.Position position *node.Position
comments *[]comment.Comment comments []comment.Comment
Class node.Node Class node.Node
Property node.Node Property node.Node
} }
@ -34,11 +34,11 @@ func (n *StaticPropertyFetch) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *StaticPropertyFetch) Comments() *[]comment.Comment { func (n *StaticPropertyFetch) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *StaticPropertyFetch) SetComments(c *[]comment.Comment) node.Node { func (n *StaticPropertyFetch) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -7,7 +7,7 @@ import (
type Ternary struct { type Ternary struct {
position *node.Position position *node.Position
comments *[]comment.Comment comments []comment.Comment
Condition node.Node Condition node.Node
IfTrue node.Node IfTrue node.Node
IfFalse node.Node IfFalse node.Node
@ -36,11 +36,11 @@ func (n *Ternary) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *Ternary) Comments() *[]comment.Comment { func (n *Ternary) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *Ternary) SetComments(c *[]comment.Comment) node.Node { func (n *Ternary) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -7,7 +7,7 @@ import (
type UnaryMinus struct { type UnaryMinus struct {
position *node.Position position *node.Position
comments *[]comment.Comment comments []comment.Comment
Expr node.Node Expr node.Node
} }
@ -32,11 +32,11 @@ func (n *UnaryMinus) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *UnaryMinus) Comments() *[]comment.Comment { func (n *UnaryMinus) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *UnaryMinus) SetComments(c *[]comment.Comment) node.Node { func (n *UnaryMinus) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -7,7 +7,7 @@ import (
type UnaryPlus struct { type UnaryPlus struct {
position *node.Position position *node.Position
comments *[]comment.Comment comments []comment.Comment
Expr node.Node Expr node.Node
} }
@ -32,11 +32,11 @@ func (n *UnaryPlus) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *UnaryPlus) Comments() *[]comment.Comment { func (n *UnaryPlus) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *UnaryPlus) SetComments(c *[]comment.Comment) node.Node { func (n *UnaryPlus) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -7,7 +7,7 @@ import (
type Variable struct { type Variable struct {
position *node.Position position *node.Position
comments *[]comment.Comment comments []comment.Comment
VarName node.Node VarName node.Node
} }
@ -32,11 +32,11 @@ func (n *Variable) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *Variable) Comments() *[]comment.Comment { func (n *Variable) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *Variable) SetComments(c *[]comment.Comment) node.Node { func (n *Variable) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -7,7 +7,7 @@ import (
type Yield struct { type Yield struct {
position *node.Position position *node.Position
comments *[]comment.Comment comments []comment.Comment
Key node.Node Key node.Node
Value node.Node Value node.Node
} }
@ -34,11 +34,11 @@ func (n *Yield) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *Yield) Comments() *[]comment.Comment { func (n *Yield) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *Yield) SetComments(c *[]comment.Comment) node.Node { func (n *Yield) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -7,7 +7,7 @@ import (
type YieldFrom struct { type YieldFrom struct {
position *node.Position position *node.Position
comments *[]comment.Comment comments []comment.Comment
Expr node.Node Expr node.Node
} }
@ -32,11 +32,11 @@ func (n *YieldFrom) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *YieldFrom) Comments() *[]comment.Comment { func (n *YieldFrom) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *YieldFrom) SetComments(c *[]comment.Comment) node.Node { func (n *YieldFrom) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -4,7 +4,7 @@ import "github.com/z7zmey/php-parser/comment"
type Identifier struct { type Identifier struct {
position *Position position *Position
comments *[]comment.Comment comments []comment.Comment
Value string Value string
} }
@ -31,11 +31,11 @@ func (n *Identifier) SetPosition(p *Position) Node {
return n return n
} }
func (n *Identifier) Comments() *[]comment.Comment { func (n *Identifier) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *Identifier) SetComments(c *[]comment.Comment) Node { func (n *Identifier) SetComments(c []comment.Comment) Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -7,7 +7,7 @@ import (
type Name struct { type Name struct {
position *node.Position position *node.Position
comments *[]comment.Comment comments []comment.Comment
Parts []node.Node Parts []node.Node
} }
@ -32,11 +32,11 @@ func (n *Name) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *Name) Comments() *[]comment.Comment { func (n *Name) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *Name) SetComments(c *[]comment.Comment) node.Node { func (n *Name) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -7,7 +7,7 @@ import (
type NamePart struct { type NamePart struct {
position *node.Position position *node.Position
comments *[]comment.Comment comments []comment.Comment
Value string Value string
} }
@ -34,11 +34,11 @@ func (n *NamePart) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n *NamePart) Comments() *[]comment.Comment { func (n *NamePart) Comments() []comment.Comment {
return n.comments return n.comments
} }
func (n *NamePart) SetComments(c *[]comment.Comment) node.Node { func (n *NamePart) SetComments(c []comment.Comment) node.Node {
n.comments = c n.comments = c
return n return n
} }

View File

@ -11,8 +11,8 @@ type Node interface {
} }
type Commenter interface { type Commenter interface {
Comments() *[]comment.Comment Comments() []comment.Comment
SetComments(*[]comment.Comment) Node SetComments([]comment.Comment) Node
} }
type Positioner interface { type Positioner interface {

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