extract comments package
This commit is contained in:
parent
b7b859edaa
commit
99856ae32f
@ -1,5 +1,13 @@
|
||||
package comment
|
||||
|
||||
import "github.com/z7zmey/php-parser/node"
|
||||
|
||||
type Comment interface {
|
||||
String() string
|
||||
}
|
||||
|
||||
type Comments map[node.Node][]Comment
|
||||
|
||||
func (c Comments) AddComments(node node.Node, comments []Comment) {
|
||||
c[node] = append(c[node], comments...)
|
||||
}
|
||||
|
@ -4,11 +4,13 @@ import (
|
||||
"fmt"
|
||||
"reflect"
|
||||
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
type dumper struct {
|
||||
indent string
|
||||
indent string
|
||||
comments comment.Comments
|
||||
}
|
||||
|
||||
func (d dumper) EnterNode(n node.Node) bool {
|
||||
@ -22,7 +24,7 @@ func (d dumper) EnterNode(n node.Node) bool {
|
||||
}
|
||||
fmt.Println()
|
||||
|
||||
if c := n.Comments(); c != nil && len(c) > 0 {
|
||||
if c := d.comments[n]; len(c) > 0 {
|
||||
fmt.Printf("%vcomments:\n", d.indent+" ")
|
||||
for _, cc := range c {
|
||||
fmt.Printf("%v%q\n", d.indent+" ", cc)
|
||||
@ -34,7 +36,7 @@ func (d dumper) EnterNode(n node.Node) bool {
|
||||
|
||||
func (d dumper) GetChildrenVisitor(key string) node.Visitor {
|
||||
fmt.Printf("%v%q:\n", d.indent+" ", key)
|
||||
return dumper{d.indent + " "}
|
||||
return dumper{d.indent + " ", d.comments}
|
||||
}
|
||||
|
||||
func (d dumper) LeaveNode(n node.Node) {
|
||||
|
4
main.go
4
main.go
@ -19,9 +19,9 @@ func main() {
|
||||
fmt.Printf("==> %s\n", real)
|
||||
|
||||
src, _ := os.Open(string(real))
|
||||
rootnode := parser.Parse(src, real)
|
||||
rootnode, comments := parser.Parse(src, real)
|
||||
|
||||
rootnode.Walk(dumper{" | "})
|
||||
rootnode.Walk(dumper{" | ", comments})
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,17 +1,13 @@
|
||||
package node
|
||||
|
||||
import "github.com/z7zmey/php-parser/comment"
|
||||
|
||||
type Argument struct {
|
||||
position *Position
|
||||
comments []comment.Comment
|
||||
Variadic bool
|
||||
Expr Node
|
||||
}
|
||||
|
||||
func NewArgument(Expression Node, Variadic bool) *Argument {
|
||||
return &Argument{
|
||||
nil,
|
||||
nil,
|
||||
Variadic,
|
||||
Expression,
|
||||
@ -33,15 +29,6 @@ func (n *Argument) SetPosition(p *Position) Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Argument) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *Argument) SetComments(c []comment.Comment) Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Argument) Walk(v Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,19 +1,16 @@
|
||||
package expr
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
type Array struct {
|
||||
position *node.Position
|
||||
comments []comment.Comment
|
||||
Items []node.Node
|
||||
}
|
||||
|
||||
func NewArray(Items []node.Node) *Array {
|
||||
return &Array{
|
||||
nil,
|
||||
nil,
|
||||
Items,
|
||||
}
|
||||
@ -32,15 +29,6 @@ func (n *Array) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Array) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *Array) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Array) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,20 +1,17 @@
|
||||
package expr
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
type ArrayDimFetch struct {
|
||||
position *node.Position
|
||||
comments []comment.Comment
|
||||
Variable node.Node
|
||||
Dim node.Node
|
||||
}
|
||||
|
||||
func NewArrayDimFetch(Variable node.Node, Dim node.Node) *ArrayDimFetch {
|
||||
return &ArrayDimFetch{
|
||||
nil,
|
||||
nil,
|
||||
Variable,
|
||||
Dim,
|
||||
@ -34,15 +31,6 @@ func (n *ArrayDimFetch) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *ArrayDimFetch) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *ArrayDimFetch) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *ArrayDimFetch) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,13 +1,11 @@
|
||||
package expr
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
type ArrayItem struct {
|
||||
position *node.Position
|
||||
comments []comment.Comment
|
||||
ByRef bool
|
||||
Key node.Node
|
||||
Val node.Node
|
||||
@ -15,7 +13,6 @@ type ArrayItem struct {
|
||||
|
||||
func NewArrayItem(Key node.Node, Val node.Node, ByRef bool) *ArrayItem {
|
||||
return &ArrayItem{
|
||||
nil,
|
||||
nil,
|
||||
ByRef,
|
||||
Key,
|
||||
@ -38,15 +35,6 @@ func (n *ArrayItem) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *ArrayItem) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *ArrayItem) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *ArrayItem) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,7 +1,6 @@
|
||||
package assign_op
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
@ -12,7 +11,6 @@ type Assign struct {
|
||||
func NewAssign(Variable node.Node, Expression node.Node) *Assign {
|
||||
return &Assign{
|
||||
AssignOp{
|
||||
nil,
|
||||
nil,
|
||||
Variable,
|
||||
Expression,
|
||||
@ -33,15 +31,6 @@ func (n *Assign) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Assign) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *Assign) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Assign) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,13 +1,11 @@
|
||||
package assign_op
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
type AssignOp struct {
|
||||
position *node.Position
|
||||
comments []comment.Comment
|
||||
Variable node.Node
|
||||
Expression node.Node
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
package assign_op
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
@ -12,7 +11,6 @@ type AssignRef struct {
|
||||
func NewAssignRef(Variable node.Node, Expression node.Node) *AssignRef {
|
||||
return &AssignRef{
|
||||
AssignOp{
|
||||
nil,
|
||||
nil,
|
||||
Variable,
|
||||
Expression,
|
||||
@ -33,15 +31,6 @@ func (n *AssignRef) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *AssignRef) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *AssignRef) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *AssignRef) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,7 +1,6 @@
|
||||
package assign_op
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
@ -12,7 +11,6 @@ type BitwiseAnd struct {
|
||||
func NewBitwiseAnd(Variable node.Node, Expression node.Node) *BitwiseAnd {
|
||||
return &BitwiseAnd{
|
||||
AssignOp{
|
||||
nil,
|
||||
nil,
|
||||
Variable,
|
||||
Expression,
|
||||
@ -33,15 +31,6 @@ func (n *BitwiseAnd) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *BitwiseAnd) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *BitwiseAnd) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *BitwiseAnd) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,7 +1,6 @@
|
||||
package assign_op
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
@ -12,7 +11,6 @@ type BitwiseOr struct {
|
||||
func NewBitwiseOr(Variable node.Node, Expression node.Node) *BitwiseOr {
|
||||
return &BitwiseOr{
|
||||
AssignOp{
|
||||
nil,
|
||||
nil,
|
||||
Variable,
|
||||
Expression,
|
||||
@ -33,15 +31,6 @@ func (n *BitwiseOr) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *BitwiseOr) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *BitwiseOr) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *BitwiseOr) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,7 +1,6 @@
|
||||
package assign_op
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
@ -12,7 +11,6 @@ type BitwiseXor struct {
|
||||
func NewBitwiseXor(Variable node.Node, Expression node.Node) *BitwiseXor {
|
||||
return &BitwiseXor{
|
||||
AssignOp{
|
||||
nil,
|
||||
nil,
|
||||
Variable,
|
||||
Expression,
|
||||
@ -33,15 +31,6 @@ func (n *BitwiseXor) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *BitwiseXor) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *BitwiseXor) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *BitwiseXor) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,7 +1,6 @@
|
||||
package assign_op
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
@ -12,7 +11,6 @@ type Concat struct {
|
||||
func NewConcat(Variable node.Node, Expression node.Node) *Concat {
|
||||
return &Concat{
|
||||
AssignOp{
|
||||
nil,
|
||||
nil,
|
||||
Variable,
|
||||
Expression,
|
||||
@ -33,15 +31,6 @@ func (n *Concat) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Concat) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *Concat) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Concat) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,7 +1,6 @@
|
||||
package assign_op
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
@ -12,7 +11,6 @@ type Div struct {
|
||||
func NewDiv(Variable node.Node, Expression node.Node) *Div {
|
||||
return &Div{
|
||||
AssignOp{
|
||||
nil,
|
||||
nil,
|
||||
Variable,
|
||||
Expression,
|
||||
@ -33,15 +31,6 @@ func (n *Div) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Div) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *Div) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Div) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,7 +1,6 @@
|
||||
package assign_op
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
@ -12,7 +11,6 @@ type Minus struct {
|
||||
func NewMinus(Variable node.Node, Expression node.Node) *Minus {
|
||||
return &Minus{
|
||||
AssignOp{
|
||||
nil,
|
||||
nil,
|
||||
Variable,
|
||||
Expression,
|
||||
@ -33,15 +31,6 @@ func (n *Minus) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Minus) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *Minus) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Minus) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,7 +1,6 @@
|
||||
package assign_op
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
@ -12,7 +11,6 @@ type Mod struct {
|
||||
func NewMod(Variable node.Node, Expression node.Node) *Mod {
|
||||
return &Mod{
|
||||
AssignOp{
|
||||
nil,
|
||||
nil,
|
||||
Variable,
|
||||
Expression,
|
||||
@ -33,15 +31,6 @@ func (n *Mod) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Mod) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *Mod) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Mod) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,7 +1,6 @@
|
||||
package assign_op
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
@ -12,7 +11,6 @@ type Mul struct {
|
||||
func NewMul(Variable node.Node, Expression node.Node) *Mul {
|
||||
return &Mul{
|
||||
AssignOp{
|
||||
nil,
|
||||
nil,
|
||||
Variable,
|
||||
Expression,
|
||||
@ -33,15 +31,6 @@ func (n *Mul) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Mul) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *Mul) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Mul) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,7 +1,6 @@
|
||||
package assign_op
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
@ -12,7 +11,6 @@ type Plus struct {
|
||||
func NewPlus(Variable node.Node, Expression node.Node) *Plus {
|
||||
return &Plus{
|
||||
AssignOp{
|
||||
nil,
|
||||
nil,
|
||||
Variable,
|
||||
Expression,
|
||||
@ -33,15 +31,6 @@ func (n *Plus) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Plus) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *Plus) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Plus) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,7 +1,6 @@
|
||||
package assign_op
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
@ -12,7 +11,6 @@ type Pow struct {
|
||||
func NewPow(Variable node.Node, Expression node.Node) *Pow {
|
||||
return &Pow{
|
||||
AssignOp{
|
||||
nil,
|
||||
nil,
|
||||
Variable,
|
||||
Expression,
|
||||
@ -33,15 +31,6 @@ func (n *Pow) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Pow) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *Pow) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Pow) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,7 +1,6 @@
|
||||
package assign_op
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
@ -12,7 +11,6 @@ type ShiftLeft struct {
|
||||
func NewShiftLeft(Variable node.Node, Expression node.Node) *ShiftLeft {
|
||||
return &ShiftLeft{
|
||||
AssignOp{
|
||||
nil,
|
||||
nil,
|
||||
Variable,
|
||||
Expression,
|
||||
@ -33,15 +31,6 @@ func (n *ShiftLeft) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *ShiftLeft) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *ShiftLeft) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *ShiftLeft) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,7 +1,6 @@
|
||||
package assign_op
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
@ -12,7 +11,6 @@ type ShiftRight struct {
|
||||
func NewShiftRight(Variable node.Node, Expression node.Node) *ShiftRight {
|
||||
return &ShiftRight{
|
||||
AssignOp{
|
||||
nil,
|
||||
nil,
|
||||
Variable,
|
||||
Expression,
|
||||
@ -33,15 +31,6 @@ func (n *ShiftRight) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *ShiftRight) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *ShiftRight) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *ShiftRight) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,13 +1,11 @@
|
||||
package binary_op
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
type BinaryOp struct {
|
||||
position *node.Position
|
||||
comments []comment.Comment
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
package binary_op
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
@ -12,7 +11,6 @@ type BitwiseAnd struct {
|
||||
func NewBitwiseAnd(Variable node.Node, Expression node.Node) *BitwiseAnd {
|
||||
return &BitwiseAnd{
|
||||
BinaryOp{
|
||||
nil,
|
||||
nil,
|
||||
Variable,
|
||||
Expression,
|
||||
@ -33,15 +31,6 @@ func (n *BitwiseAnd) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *BitwiseAnd) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *BitwiseAnd) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *BitwiseAnd) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,7 +1,6 @@
|
||||
package binary_op
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
@ -12,7 +11,6 @@ type BitwiseOr struct {
|
||||
func NewBitwiseOr(Variable node.Node, Expression node.Node) *BitwiseOr {
|
||||
return &BitwiseOr{
|
||||
BinaryOp{
|
||||
nil,
|
||||
nil,
|
||||
Variable,
|
||||
Expression,
|
||||
@ -33,15 +31,6 @@ func (n *BitwiseOr) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *BitwiseOr) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *BitwiseOr) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *BitwiseOr) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,7 +1,6 @@
|
||||
package binary_op
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
@ -12,7 +11,6 @@ type BitwiseXor struct {
|
||||
func NewBitwiseXor(Variable node.Node, Expression node.Node) *BitwiseXor {
|
||||
return &BitwiseXor{
|
||||
BinaryOp{
|
||||
nil,
|
||||
nil,
|
||||
Variable,
|
||||
Expression,
|
||||
@ -33,15 +31,6 @@ func (n *BitwiseXor) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *BitwiseXor) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *BitwiseXor) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *BitwiseXor) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,7 +1,6 @@
|
||||
package binary_op
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
@ -12,7 +11,6 @@ type BooleanAnd struct {
|
||||
func NewBooleanAnd(Variable node.Node, Expression node.Node) *BooleanAnd {
|
||||
return &BooleanAnd{
|
||||
BinaryOp{
|
||||
nil,
|
||||
nil,
|
||||
Variable,
|
||||
Expression,
|
||||
@ -33,15 +31,6 @@ func (n *BooleanAnd) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *BooleanAnd) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *BooleanAnd) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *BooleanAnd) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,7 +1,6 @@
|
||||
package binary_op
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
@ -12,7 +11,6 @@ type BooleanOr struct {
|
||||
func NewBooleanOr(Variable node.Node, Expression node.Node) *BooleanOr {
|
||||
return &BooleanOr{
|
||||
BinaryOp{
|
||||
nil,
|
||||
nil,
|
||||
Variable,
|
||||
Expression,
|
||||
@ -33,15 +31,6 @@ func (n *BooleanOr) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *BooleanOr) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *BooleanOr) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *BooleanOr) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,7 +1,6 @@
|
||||
package binary_op
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
@ -12,7 +11,6 @@ type Coalesce struct {
|
||||
func NewCoalesce(Variable node.Node, Expression node.Node) *Coalesce {
|
||||
return &Coalesce{
|
||||
BinaryOp{
|
||||
nil,
|
||||
nil,
|
||||
Variable,
|
||||
Expression,
|
||||
@ -33,15 +31,6 @@ func (n *Coalesce) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Coalesce) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *Coalesce) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Coalesce) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,7 +1,6 @@
|
||||
package binary_op
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
@ -12,7 +11,6 @@ type Concat struct {
|
||||
func NewConcat(Variable node.Node, Expression node.Node) *Concat {
|
||||
return &Concat{
|
||||
BinaryOp{
|
||||
nil,
|
||||
nil,
|
||||
Variable,
|
||||
Expression,
|
||||
@ -33,15 +31,6 @@ func (n *Concat) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Concat) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *Concat) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Concat) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,7 +1,6 @@
|
||||
package binary_op
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
@ -12,7 +11,6 @@ type Div struct {
|
||||
func NewDiv(Variable node.Node, Expression node.Node) *Div {
|
||||
return &Div{
|
||||
BinaryOp{
|
||||
nil,
|
||||
nil,
|
||||
Variable,
|
||||
Expression,
|
||||
@ -33,15 +31,6 @@ func (n *Div) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Div) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *Div) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Div) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,7 +1,6 @@
|
||||
package binary_op
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
@ -12,7 +11,6 @@ type Equal struct {
|
||||
func NewEqual(Variable node.Node, Expression node.Node) *Equal {
|
||||
return &Equal{
|
||||
BinaryOp{
|
||||
nil,
|
||||
nil,
|
||||
Variable,
|
||||
Expression,
|
||||
@ -33,15 +31,6 @@ func (n *Equal) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Equal) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *Equal) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Equal) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,7 +1,6 @@
|
||||
package binary_op
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
@ -12,7 +11,6 @@ type Greater struct {
|
||||
func NewGreater(Variable node.Node, Expression node.Node) *Greater {
|
||||
return &Greater{
|
||||
BinaryOp{
|
||||
nil,
|
||||
nil,
|
||||
Variable,
|
||||
Expression,
|
||||
@ -33,15 +31,6 @@ func (n *Greater) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Greater) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *Greater) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Greater) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,7 +1,6 @@
|
||||
package binary_op
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
@ -12,7 +11,6 @@ type GreaterOrEqual struct {
|
||||
func NewGreaterOrEqual(Variable node.Node, Expression node.Node) *GreaterOrEqual {
|
||||
return &GreaterOrEqual{
|
||||
BinaryOp{
|
||||
nil,
|
||||
nil,
|
||||
Variable,
|
||||
Expression,
|
||||
@ -33,15 +31,6 @@ func (n *GreaterOrEqual) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *GreaterOrEqual) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *GreaterOrEqual) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *GreaterOrEqual) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,7 +1,6 @@
|
||||
package binary_op
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
@ -12,7 +11,6 @@ type Identical struct {
|
||||
func NewIdentical(Variable node.Node, Expression node.Node) *Identical {
|
||||
return &Identical{
|
||||
BinaryOp{
|
||||
nil,
|
||||
nil,
|
||||
Variable,
|
||||
Expression,
|
||||
@ -33,15 +31,6 @@ func (n *Identical) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Identical) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *Identical) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Identical) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,7 +1,6 @@
|
||||
package binary_op
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
@ -12,7 +11,6 @@ type LogicalAnd struct {
|
||||
func NewLogicalAnd(Variable node.Node, Expression node.Node) *LogicalAnd {
|
||||
return &LogicalAnd{
|
||||
BinaryOp{
|
||||
nil,
|
||||
nil,
|
||||
Variable,
|
||||
Expression,
|
||||
@ -33,15 +31,6 @@ func (n *LogicalAnd) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *LogicalAnd) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *LogicalAnd) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *LogicalAnd) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,7 +1,6 @@
|
||||
package binary_op
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
@ -12,7 +11,6 @@ type LogicalOr struct {
|
||||
func NewLogicalOr(Variable node.Node, Expression node.Node) *LogicalOr {
|
||||
return &LogicalOr{
|
||||
BinaryOp{
|
||||
nil,
|
||||
nil,
|
||||
Variable,
|
||||
Expression,
|
||||
@ -33,15 +31,6 @@ func (n *LogicalOr) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *LogicalOr) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *LogicalOr) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *LogicalOr) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,7 +1,6 @@
|
||||
package binary_op
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
@ -12,7 +11,6 @@ type LogicalXor struct {
|
||||
func NewLogicalXor(Variable node.Node, Expression node.Node) *LogicalXor {
|
||||
return &LogicalXor{
|
||||
BinaryOp{
|
||||
nil,
|
||||
nil,
|
||||
Variable,
|
||||
Expression,
|
||||
@ -33,15 +31,6 @@ func (n *LogicalXor) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *LogicalXor) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *LogicalXor) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *LogicalXor) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,7 +1,6 @@
|
||||
package binary_op
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
@ -12,7 +11,6 @@ type Minus struct {
|
||||
func NewMinus(Variable node.Node, Expression node.Node) *Minus {
|
||||
return &Minus{
|
||||
BinaryOp{
|
||||
nil,
|
||||
nil,
|
||||
Variable,
|
||||
Expression,
|
||||
@ -33,15 +31,6 @@ func (n *Minus) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Minus) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *Minus) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Minus) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,7 +1,6 @@
|
||||
package binary_op
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
@ -12,7 +11,6 @@ type Mod struct {
|
||||
func NewMod(Variable node.Node, Expression node.Node) *Mod {
|
||||
return &Mod{
|
||||
BinaryOp{
|
||||
nil,
|
||||
nil,
|
||||
Variable,
|
||||
Expression,
|
||||
@ -33,15 +31,6 @@ func (n *Mod) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Mod) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *Mod) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Mod) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,7 +1,6 @@
|
||||
package binary_op
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
@ -12,7 +11,6 @@ type Mul struct {
|
||||
func NewMul(Variable node.Node, Expression node.Node) *Mul {
|
||||
return &Mul{
|
||||
BinaryOp{
|
||||
nil,
|
||||
nil,
|
||||
Variable,
|
||||
Expression,
|
||||
@ -33,15 +31,6 @@ func (n *Mul) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Mul) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *Mul) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Mul) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,7 +1,6 @@
|
||||
package binary_op
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
@ -12,7 +11,6 @@ type NotEqual struct {
|
||||
func NewNotEqual(Variable node.Node, Expression node.Node) *NotEqual {
|
||||
return &NotEqual{
|
||||
BinaryOp{
|
||||
nil,
|
||||
nil,
|
||||
Variable,
|
||||
Expression,
|
||||
@ -33,15 +31,6 @@ func (n *NotEqual) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *NotEqual) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *NotEqual) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *NotEqual) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,7 +1,6 @@
|
||||
package binary_op
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
@ -12,7 +11,6 @@ type NotIdentical struct {
|
||||
func NewNotIdentical(Variable node.Node, Expression node.Node) *NotIdentical {
|
||||
return &NotIdentical{
|
||||
BinaryOp{
|
||||
nil,
|
||||
nil,
|
||||
Variable,
|
||||
Expression,
|
||||
@ -33,15 +31,6 @@ func (n *NotIdentical) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *NotIdentical) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *NotIdentical) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *NotIdentical) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,7 +1,6 @@
|
||||
package binary_op
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
@ -12,7 +11,6 @@ type Plus struct {
|
||||
func NewPlus(Variable node.Node, Expression node.Node) *Plus {
|
||||
return &Plus{
|
||||
BinaryOp{
|
||||
nil,
|
||||
nil,
|
||||
Variable,
|
||||
Expression,
|
||||
@ -33,15 +31,6 @@ func (n *Plus) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Plus) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *Plus) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Plus) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,7 +1,6 @@
|
||||
package binary_op
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
@ -12,7 +11,6 @@ type Pow struct {
|
||||
func NewPow(Variable node.Node, Expression node.Node) *Pow {
|
||||
return &Pow{
|
||||
BinaryOp{
|
||||
nil,
|
||||
nil,
|
||||
Variable,
|
||||
Expression,
|
||||
@ -33,15 +31,6 @@ func (n *Pow) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Pow) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *Pow) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Pow) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,7 +1,6 @@
|
||||
package binary_op
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
@ -12,7 +11,6 @@ type ShiftLeft struct {
|
||||
func NewShiftLeft(Variable node.Node, Expression node.Node) *ShiftLeft {
|
||||
return &ShiftLeft{
|
||||
BinaryOp{
|
||||
nil,
|
||||
nil,
|
||||
Variable,
|
||||
Expression,
|
||||
@ -33,15 +31,6 @@ func (n *ShiftLeft) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *ShiftLeft) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *ShiftLeft) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *ShiftLeft) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,7 +1,6 @@
|
||||
package binary_op
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
@ -12,7 +11,6 @@ type ShiftRight struct {
|
||||
func NewShiftRight(Variable node.Node, Expression node.Node) *ShiftRight {
|
||||
return &ShiftRight{
|
||||
BinaryOp{
|
||||
nil,
|
||||
nil,
|
||||
Variable,
|
||||
Expression,
|
||||
@ -33,15 +31,6 @@ func (n *ShiftRight) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *ShiftRight) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *ShiftRight) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *ShiftRight) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,7 +1,6 @@
|
||||
package binary_op
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
@ -12,7 +11,6 @@ type Smaller struct {
|
||||
func NewSmaller(Variable node.Node, Expression node.Node) *Smaller {
|
||||
return &Smaller{
|
||||
BinaryOp{
|
||||
nil,
|
||||
nil,
|
||||
Variable,
|
||||
Expression,
|
||||
@ -33,15 +31,6 @@ func (n *Smaller) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Smaller) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *Smaller) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Smaller) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,7 +1,6 @@
|
||||
package binary_op
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
@ -12,7 +11,6 @@ type SmallerOrEqual struct {
|
||||
func NewSmallerOrEqual(Variable node.Node, Expression node.Node) *SmallerOrEqual {
|
||||
return &SmallerOrEqual{
|
||||
BinaryOp{
|
||||
nil,
|
||||
nil,
|
||||
Variable,
|
||||
Expression,
|
||||
@ -33,15 +31,6 @@ func (n *SmallerOrEqual) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *SmallerOrEqual) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *SmallerOrEqual) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *SmallerOrEqual) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,7 +1,6 @@
|
||||
package binary_op
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
@ -12,7 +11,6 @@ type Spaceship struct {
|
||||
func NewSpaceship(Variable node.Node, Expression node.Node) *Spaceship {
|
||||
return &Spaceship{
|
||||
BinaryOp{
|
||||
nil,
|
||||
nil,
|
||||
Variable,
|
||||
Expression,
|
||||
@ -33,15 +31,6 @@ func (n *Spaceship) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Spaceship) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *Spaceship) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Spaceship) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,19 +1,16 @@
|
||||
package expr
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
type BitwiseNot struct {
|
||||
position *node.Position
|
||||
comments []comment.Comment
|
||||
Expr node.Node
|
||||
}
|
||||
|
||||
func NewBitwiseNot(Expression node.Node) *BitwiseNot {
|
||||
return &BitwiseNot{
|
||||
nil,
|
||||
nil,
|
||||
Expression,
|
||||
}
|
||||
@ -32,15 +29,6 @@ func (n *BitwiseNot) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *BitwiseNot) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *BitwiseNot) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *BitwiseNot) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,19 +1,16 @@
|
||||
package expr
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
type BooleanNot struct {
|
||||
position *node.Position
|
||||
comments []comment.Comment
|
||||
Expr node.Node
|
||||
}
|
||||
|
||||
func NewBooleanNot(Expression node.Node) *BooleanNot {
|
||||
return &BooleanNot{
|
||||
nil,
|
||||
nil,
|
||||
Expression,
|
||||
}
|
||||
@ -32,15 +29,6 @@ func (n *BooleanNot) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *BooleanNot) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *BooleanNot) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *BooleanNot) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,12 +1,10 @@
|
||||
package cast
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
type Cast struct {
|
||||
position *node.Position
|
||||
comments []comment.Comment
|
||||
Expr node.Node
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
package cast
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
@ -12,7 +11,6 @@ type CastArray struct {
|
||||
func NewCastArray(Expr node.Node) *CastArray {
|
||||
return &CastArray{
|
||||
Cast{
|
||||
nil,
|
||||
nil,
|
||||
Expr,
|
||||
},
|
||||
@ -32,15 +30,6 @@ func (n *CastArray) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *CastArray) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *CastArray) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *CastArray) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,7 +1,6 @@
|
||||
package cast
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
@ -12,7 +11,6 @@ type CastBool struct {
|
||||
func NewCastBool(Expr node.Node) *CastBool {
|
||||
return &CastBool{
|
||||
Cast{
|
||||
nil,
|
||||
nil,
|
||||
Expr,
|
||||
},
|
||||
@ -32,15 +30,6 @@ func (n *CastBool) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *CastBool) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *CastBool) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *CastBool) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,7 +1,6 @@
|
||||
package cast
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
@ -12,7 +11,6 @@ type CastDouble struct {
|
||||
func NewCastDouble(Expr node.Node) *CastDouble {
|
||||
return &CastDouble{
|
||||
Cast{
|
||||
nil,
|
||||
nil,
|
||||
Expr,
|
||||
},
|
||||
@ -32,15 +30,6 @@ func (n *CastDouble) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *CastDouble) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *CastDouble) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *CastDouble) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,7 +1,6 @@
|
||||
package cast
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
@ -12,7 +11,6 @@ type CastInt struct {
|
||||
func NewCastInt(Expr node.Node) *CastInt {
|
||||
return &CastInt{
|
||||
Cast{
|
||||
nil,
|
||||
nil,
|
||||
Expr,
|
||||
},
|
||||
@ -32,15 +30,6 @@ func (n *CastInt) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *CastInt) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *CastInt) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *CastInt) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,7 +1,6 @@
|
||||
package cast
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
@ -12,7 +11,6 @@ type CastObject struct {
|
||||
func NewCastObject(Expr node.Node) *CastObject {
|
||||
return &CastObject{
|
||||
Cast{
|
||||
nil,
|
||||
nil,
|
||||
Expr,
|
||||
},
|
||||
@ -32,15 +30,6 @@ func (n *CastObject) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *CastObject) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *CastObject) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *CastObject) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,7 +1,6 @@
|
||||
package cast
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
@ -12,7 +11,6 @@ type CastString struct {
|
||||
func NewCastString(Expr node.Node) *CastString {
|
||||
return &CastString{
|
||||
Cast{
|
||||
nil,
|
||||
nil,
|
||||
Expr,
|
||||
},
|
||||
@ -32,15 +30,6 @@ func (n *CastString) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *CastString) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *CastString) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *CastString) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,7 +1,6 @@
|
||||
package cast
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
@ -12,7 +11,6 @@ type CastUnset struct {
|
||||
func NewCastUnset(Expr node.Node) *CastUnset {
|
||||
return &CastUnset{
|
||||
Cast{
|
||||
nil,
|
||||
nil,
|
||||
Expr,
|
||||
},
|
||||
@ -32,15 +30,6 @@ func (n *CastUnset) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *CastUnset) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *CastUnset) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *CastUnset) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,20 +1,17 @@
|
||||
package expr
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
type ClassConstFetch struct {
|
||||
position *node.Position
|
||||
comments []comment.Comment
|
||||
Class node.Node
|
||||
ConstantName node.Node
|
||||
}
|
||||
|
||||
func NewClassConstFetch(Class node.Node, ConstantName node.Node) *ClassConstFetch {
|
||||
return &ClassConstFetch{
|
||||
nil,
|
||||
nil,
|
||||
Class,
|
||||
ConstantName,
|
||||
@ -34,15 +31,6 @@ func (n *ClassConstFetch) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *ClassConstFetch) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *ClassConstFetch) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *ClassConstFetch) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,19 +1,16 @@
|
||||
package expr
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
type Clone struct {
|
||||
position *node.Position
|
||||
comments []comment.Comment
|
||||
Expr node.Node
|
||||
}
|
||||
|
||||
func NewClone(Expression node.Node) *Clone {
|
||||
return &Clone{
|
||||
nil,
|
||||
nil,
|
||||
Expression,
|
||||
}
|
||||
@ -32,15 +29,6 @@ func (n *Clone) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Clone) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *Clone) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Clone) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,13 +1,11 @@
|
||||
package expr
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
type Closure struct {
|
||||
position *node.Position
|
||||
comments []comment.Comment
|
||||
ReturnsRef bool
|
||||
Static bool
|
||||
PhpDocComment string
|
||||
@ -19,7 +17,6 @@ type Closure struct {
|
||||
|
||||
func NewClosure(Params []node.Node, Uses []node.Node, ReturnType node.Node, Stmts []node.Node, Static bool, ReturnsRef bool, PhpDocComment string) *Closure {
|
||||
return &Closure{
|
||||
nil,
|
||||
nil,
|
||||
ReturnsRef,
|
||||
Static,
|
||||
@ -48,15 +45,6 @@ func (n *Closure) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Closure) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *Closure) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Closure) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,20 +1,17 @@
|
||||
package expr
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
type ClusureUse struct {
|
||||
position *node.Position
|
||||
comments []comment.Comment
|
||||
ByRef bool
|
||||
Variable node.Node
|
||||
}
|
||||
|
||||
func NewClusureUse(Variable node.Node, ByRef bool) *ClusureUse {
|
||||
return &ClusureUse{
|
||||
nil,
|
||||
nil,
|
||||
ByRef,
|
||||
Variable,
|
||||
@ -36,15 +33,6 @@ func (n *ClusureUse) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *ClusureUse) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *ClusureUse) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *ClusureUse) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,19 +1,16 @@
|
||||
package expr
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
type ConstFetch struct {
|
||||
position *node.Position
|
||||
comments []comment.Comment
|
||||
Constant node.Node
|
||||
}
|
||||
|
||||
func NewConstFetch(Constant node.Node) *ConstFetch {
|
||||
return &ConstFetch{
|
||||
nil,
|
||||
nil,
|
||||
Constant,
|
||||
}
|
||||
@ -32,15 +29,6 @@ func (n *ConstFetch) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *ConstFetch) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *ConstFetch) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *ConstFetch) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,19 +1,16 @@
|
||||
package expr
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
type Empty struct {
|
||||
position *node.Position
|
||||
comments []comment.Comment
|
||||
Expr node.Node
|
||||
}
|
||||
|
||||
func NewEmpty(Expression node.Node) *Empty {
|
||||
return &Empty{
|
||||
nil,
|
||||
nil,
|
||||
Expression,
|
||||
}
|
||||
@ -32,15 +29,6 @@ func (n *Empty) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Empty) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *Empty) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Empty) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,19 +1,16 @@
|
||||
package expr
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
type ErrorSuppress struct {
|
||||
position *node.Position
|
||||
comments []comment.Comment
|
||||
Expr node.Node
|
||||
}
|
||||
|
||||
func NewErrorSuppress(Expression node.Node) *ErrorSuppress {
|
||||
return &ErrorSuppress{
|
||||
nil,
|
||||
nil,
|
||||
Expression,
|
||||
}
|
||||
@ -32,15 +29,6 @@ func (n *ErrorSuppress) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *ErrorSuppress) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *ErrorSuppress) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *ErrorSuppress) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,19 +1,16 @@
|
||||
package expr
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
type Eval struct {
|
||||
position *node.Position
|
||||
comments []comment.Comment
|
||||
Expr node.Node
|
||||
}
|
||||
|
||||
func NewEval(Expression node.Node) *Eval {
|
||||
return &Eval{
|
||||
nil,
|
||||
nil,
|
||||
Expression,
|
||||
}
|
||||
@ -32,15 +29,6 @@ func (n *Eval) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Eval) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *Eval) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Eval) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,20 +1,17 @@
|
||||
package expr
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
type Exit struct {
|
||||
position *node.Position
|
||||
comments []comment.Comment
|
||||
Expr node.Node
|
||||
IsDie bool
|
||||
}
|
||||
|
||||
func NewExit(Expr node.Node, IsDie bool) *Exit {
|
||||
return &Exit{
|
||||
nil,
|
||||
nil,
|
||||
Expr,
|
||||
IsDie,
|
||||
@ -36,15 +33,6 @@ func (n *Exit) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Exit) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *Exit) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Exit) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,20 +1,17 @@
|
||||
package expr
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
type FunctionCall struct {
|
||||
position *node.Position
|
||||
comments []comment.Comment
|
||||
Function node.Node
|
||||
Arguments []node.Node
|
||||
}
|
||||
|
||||
func NewFunctionCall(Function node.Node, Arguments []node.Node) *FunctionCall {
|
||||
return &FunctionCall{
|
||||
nil,
|
||||
nil,
|
||||
Function,
|
||||
Arguments,
|
||||
@ -34,15 +31,6 @@ func (n *FunctionCall) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *FunctionCall) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *FunctionCall) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *FunctionCall) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,19 +1,16 @@
|
||||
package expr
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
type Include struct {
|
||||
position *node.Position
|
||||
comments []comment.Comment
|
||||
Expr node.Node
|
||||
}
|
||||
|
||||
func NewInclude(Expression node.Node) *Include {
|
||||
return &Include{
|
||||
nil,
|
||||
nil,
|
||||
Expression,
|
||||
}
|
||||
@ -32,15 +29,6 @@ func (n *Include) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Include) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *Include) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Include) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,19 +1,16 @@
|
||||
package expr
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
type IncludeOnce struct {
|
||||
position *node.Position
|
||||
comments []comment.Comment
|
||||
Expr node.Node
|
||||
}
|
||||
|
||||
func NewIncludeOnce(Expression node.Node) *IncludeOnce {
|
||||
return &IncludeOnce{
|
||||
nil,
|
||||
nil,
|
||||
Expression,
|
||||
}
|
||||
@ -32,15 +29,6 @@ func (n *IncludeOnce) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *IncludeOnce) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *IncludeOnce) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *IncludeOnce) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,20 +1,17 @@
|
||||
package expr
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
type InstanceOf struct {
|
||||
position *node.Position
|
||||
comments []comment.Comment
|
||||
Expr node.Node
|
||||
Class node.Node
|
||||
}
|
||||
|
||||
func NewInstanceOf(Expr node.Node, Class node.Node) *InstanceOf {
|
||||
return &InstanceOf{
|
||||
nil,
|
||||
nil,
|
||||
Expr,
|
||||
Class,
|
||||
@ -34,15 +31,6 @@ func (n *InstanceOf) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *InstanceOf) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *InstanceOf) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *InstanceOf) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,19 +1,16 @@
|
||||
package expr
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
type Isset struct {
|
||||
position *node.Position
|
||||
comments []comment.Comment
|
||||
Variables []node.Node
|
||||
}
|
||||
|
||||
func NewIsset(Variables []node.Node) *Isset {
|
||||
return &Isset{
|
||||
nil,
|
||||
nil,
|
||||
Variables,
|
||||
}
|
||||
@ -32,15 +29,6 @@ func (n *Isset) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Isset) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *Isset) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Isset) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,19 +1,16 @@
|
||||
package expr
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
type List struct {
|
||||
position *node.Position
|
||||
comments []comment.Comment
|
||||
Items []node.Node
|
||||
}
|
||||
|
||||
func NewList(Items []node.Node) *List {
|
||||
return &List{
|
||||
nil,
|
||||
nil,
|
||||
Items,
|
||||
}
|
||||
@ -32,15 +29,6 @@ func (n *List) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *List) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *List) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *List) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,13 +1,11 @@
|
||||
package expr
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
type MethodCall struct {
|
||||
position *node.Position
|
||||
comments []comment.Comment
|
||||
Variable node.Node
|
||||
Method node.Node
|
||||
Arguments []node.Node
|
||||
@ -15,7 +13,6 @@ type MethodCall struct {
|
||||
|
||||
func NewMethodCall(Variable node.Node, Method node.Node, Arguments []node.Node) *MethodCall {
|
||||
return &MethodCall{
|
||||
nil,
|
||||
nil,
|
||||
Variable,
|
||||
Method,
|
||||
@ -36,15 +33,6 @@ func (n *MethodCall) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *MethodCall) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *MethodCall) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *MethodCall) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,20 +1,17 @@
|
||||
package expr
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
type New struct {
|
||||
position *node.Position
|
||||
comments []comment.Comment
|
||||
Class node.Node
|
||||
Arguments []node.Node
|
||||
}
|
||||
|
||||
func NewNew(Class node.Node, Arguments []node.Node) *New {
|
||||
return &New{
|
||||
nil,
|
||||
nil,
|
||||
Class,
|
||||
Arguments,
|
||||
@ -34,15 +31,6 @@ func (n *New) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *New) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *New) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *New) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,19 +1,16 @@
|
||||
package expr
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
type PostDec struct {
|
||||
position *node.Position
|
||||
comments []comment.Comment
|
||||
Variable node.Node
|
||||
}
|
||||
|
||||
func NewPostDec(Variable node.Node) *PostDec {
|
||||
return &PostDec{
|
||||
nil,
|
||||
nil,
|
||||
Variable,
|
||||
}
|
||||
@ -32,15 +29,6 @@ func (n *PostDec) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *PostDec) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *PostDec) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *PostDec) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,19 +1,16 @@
|
||||
package expr
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
type PostInc struct {
|
||||
position *node.Position
|
||||
comments []comment.Comment
|
||||
Variable node.Node
|
||||
}
|
||||
|
||||
func NewPostInc(Variable node.Node) *PostInc {
|
||||
return &PostInc{
|
||||
nil,
|
||||
nil,
|
||||
Variable,
|
||||
}
|
||||
@ -32,15 +29,6 @@ func (n *PostInc) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *PostInc) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *PostInc) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *PostInc) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,19 +1,16 @@
|
||||
package expr
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
type PreDec struct {
|
||||
position *node.Position
|
||||
comments []comment.Comment
|
||||
Variable node.Node
|
||||
}
|
||||
|
||||
func NewPreDec(Variable node.Node) *PreDec {
|
||||
return &PreDec{
|
||||
nil,
|
||||
nil,
|
||||
Variable,
|
||||
}
|
||||
@ -32,15 +29,6 @@ func (n *PreDec) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *PreDec) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *PreDec) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *PreDec) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,19 +1,16 @@
|
||||
package expr
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
type PreInc struct {
|
||||
position *node.Position
|
||||
comments []comment.Comment
|
||||
Variable node.Node
|
||||
}
|
||||
|
||||
func NewPreInc(Variable node.Node) *PreInc {
|
||||
return &PreInc{
|
||||
nil,
|
||||
nil,
|
||||
Variable,
|
||||
}
|
||||
@ -32,15 +29,6 @@ func (n *PreInc) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *PreInc) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *PreInc) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *PreInc) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,19 +1,16 @@
|
||||
package expr
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
type Print struct {
|
||||
position *node.Position
|
||||
comments []comment.Comment
|
||||
Expr node.Node
|
||||
}
|
||||
|
||||
func NewPrint(Expression node.Node) *Print {
|
||||
return &Print{
|
||||
nil,
|
||||
nil,
|
||||
Expression,
|
||||
}
|
||||
@ -32,15 +29,6 @@ func (n *Print) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Print) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *Print) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Print) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,20 +1,17 @@
|
||||
package expr
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
type PropertyFetch struct {
|
||||
position *node.Position
|
||||
comments []comment.Comment
|
||||
Variable node.Node
|
||||
Property node.Node
|
||||
}
|
||||
|
||||
func NewPropertyFetch(Variable node.Node, Property node.Node) *PropertyFetch {
|
||||
return &PropertyFetch{
|
||||
nil,
|
||||
nil,
|
||||
Variable,
|
||||
Property,
|
||||
@ -34,15 +31,6 @@ func (n *PropertyFetch) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *PropertyFetch) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *PropertyFetch) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *PropertyFetch) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,19 +1,16 @@
|
||||
package expr
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
type Require struct {
|
||||
position *node.Position
|
||||
comments []comment.Comment
|
||||
Expr node.Node
|
||||
}
|
||||
|
||||
func NewRequire(Expression node.Node) *Require {
|
||||
return &Require{
|
||||
nil,
|
||||
nil,
|
||||
Expression,
|
||||
}
|
||||
@ -32,15 +29,6 @@ func (n *Require) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Require) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *Require) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Require) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,19 +1,16 @@
|
||||
package expr
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
type RequireOnce struct {
|
||||
position *node.Position
|
||||
comments []comment.Comment
|
||||
Expr node.Node
|
||||
}
|
||||
|
||||
func NewRequireOnce(Expression node.Node) *RequireOnce {
|
||||
return &RequireOnce{
|
||||
nil,
|
||||
nil,
|
||||
Expression,
|
||||
}
|
||||
@ -32,15 +29,6 @@ func (n *RequireOnce) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *RequireOnce) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *RequireOnce) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *RequireOnce) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,19 +1,16 @@
|
||||
package expr
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
type ShellExec struct {
|
||||
position *node.Position
|
||||
comments []comment.Comment
|
||||
Parts []node.Node
|
||||
}
|
||||
|
||||
func NewShellExec(Parts []node.Node) *ShellExec {
|
||||
return &ShellExec{
|
||||
nil,
|
||||
nil,
|
||||
Parts,
|
||||
}
|
||||
@ -32,15 +29,6 @@ func (n *ShellExec) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *ShellExec) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *ShellExec) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *ShellExec) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,19 +1,16 @@
|
||||
package expr
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
type ShortArray struct {
|
||||
position *node.Position
|
||||
comments []comment.Comment
|
||||
Items []node.Node
|
||||
}
|
||||
|
||||
func NewShortArray(Items []node.Node) *ShortArray {
|
||||
return &ShortArray{
|
||||
nil,
|
||||
nil,
|
||||
Items,
|
||||
}
|
||||
@ -32,15 +29,6 @@ func (n *ShortArray) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *ShortArray) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *ShortArray) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *ShortArray) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,19 +1,16 @@
|
||||
package expr
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
type ShortList struct {
|
||||
position *node.Position
|
||||
comments []comment.Comment
|
||||
Items []node.Node
|
||||
}
|
||||
|
||||
func NewShortList(Items []node.Node) *ShortList {
|
||||
return &ShortList{
|
||||
nil,
|
||||
nil,
|
||||
Items,
|
||||
}
|
||||
@ -32,15 +29,6 @@ func (n *ShortList) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *ShortList) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *ShortList) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *ShortList) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,13 +1,11 @@
|
||||
package expr
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
type StaticCall struct {
|
||||
position *node.Position
|
||||
comments []comment.Comment
|
||||
Class node.Node
|
||||
Call node.Node
|
||||
Arguments []node.Node
|
||||
@ -15,7 +13,6 @@ type StaticCall struct {
|
||||
|
||||
func NewStaticCall(Class node.Node, Call node.Node, Arguments []node.Node) *StaticCall {
|
||||
return &StaticCall{
|
||||
nil,
|
||||
nil,
|
||||
Class,
|
||||
Call,
|
||||
@ -36,15 +33,6 @@ func (n *StaticCall) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *StaticCall) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *StaticCall) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *StaticCall) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,20 +1,17 @@
|
||||
package expr
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
type StaticPropertyFetch struct {
|
||||
position *node.Position
|
||||
comments []comment.Comment
|
||||
Class node.Node
|
||||
Property node.Node
|
||||
}
|
||||
|
||||
func NewStaticPropertyFetch(Class node.Node, Property node.Node) *StaticPropertyFetch {
|
||||
return &StaticPropertyFetch{
|
||||
nil,
|
||||
nil,
|
||||
Class,
|
||||
Property,
|
||||
@ -34,15 +31,6 @@ func (n *StaticPropertyFetch) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *StaticPropertyFetch) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *StaticPropertyFetch) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *StaticPropertyFetch) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,13 +1,11 @@
|
||||
package expr
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
type Ternary struct {
|
||||
position *node.Position
|
||||
comments []comment.Comment
|
||||
Condition node.Node
|
||||
IfTrue node.Node
|
||||
IfFalse node.Node
|
||||
@ -15,7 +13,6 @@ type Ternary struct {
|
||||
|
||||
func NewTernary(Condition node.Node, IfTrue node.Node, IfFalse node.Node) *Ternary {
|
||||
return &Ternary{
|
||||
nil,
|
||||
nil,
|
||||
Condition,
|
||||
IfTrue,
|
||||
@ -36,15 +33,6 @@ func (n *Ternary) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Ternary) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *Ternary) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Ternary) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,19 +1,16 @@
|
||||
package expr
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
type UnaryMinus struct {
|
||||
position *node.Position
|
||||
comments []comment.Comment
|
||||
Expr node.Node
|
||||
}
|
||||
|
||||
func NewUnaryMinus(Expression node.Node) *UnaryMinus {
|
||||
return &UnaryMinus{
|
||||
nil,
|
||||
nil,
|
||||
Expression,
|
||||
}
|
||||
@ -32,15 +29,6 @@ func (n *UnaryMinus) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *UnaryMinus) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *UnaryMinus) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *UnaryMinus) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,19 +1,16 @@
|
||||
package expr
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
type UnaryPlus struct {
|
||||
position *node.Position
|
||||
comments []comment.Comment
|
||||
Expr node.Node
|
||||
}
|
||||
|
||||
func NewUnaryPlus(Expression node.Node) *UnaryPlus {
|
||||
return &UnaryPlus{
|
||||
nil,
|
||||
nil,
|
||||
Expression,
|
||||
}
|
||||
@ -32,15 +29,6 @@ func (n *UnaryPlus) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *UnaryPlus) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *UnaryPlus) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *UnaryPlus) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,19 +1,16 @@
|
||||
package expr
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
type Variable struct {
|
||||
position *node.Position
|
||||
comments []comment.Comment
|
||||
VarName node.Node
|
||||
}
|
||||
|
||||
func NewVariable(VarName node.Node) *Variable {
|
||||
return &Variable{
|
||||
nil,
|
||||
nil,
|
||||
VarName,
|
||||
}
|
||||
@ -32,15 +29,6 @@ func (n *Variable) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Variable) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *Variable) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Variable) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,20 +1,17 @@
|
||||
package expr
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
type Yield struct {
|
||||
position *node.Position
|
||||
comments []comment.Comment
|
||||
Key node.Node
|
||||
Value node.Node
|
||||
}
|
||||
|
||||
func NewYield(Key node.Node, Value node.Node) *Yield {
|
||||
return &Yield{
|
||||
nil,
|
||||
nil,
|
||||
Key,
|
||||
Value,
|
||||
@ -34,15 +31,6 @@ func (n *Yield) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Yield) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *Yield) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Yield) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,19 +1,16 @@
|
||||
package expr
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
type YieldFrom struct {
|
||||
position *node.Position
|
||||
comments []comment.Comment
|
||||
Expr node.Node
|
||||
}
|
||||
|
||||
func NewYieldFrom(Expression node.Node) *YieldFrom {
|
||||
return &YieldFrom{
|
||||
nil,
|
||||
nil,
|
||||
Expression,
|
||||
}
|
||||
@ -32,15 +29,6 @@ func (n *YieldFrom) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *YieldFrom) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *YieldFrom) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *YieldFrom) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,16 +1,12 @@
|
||||
package node
|
||||
|
||||
import "github.com/z7zmey/php-parser/comment"
|
||||
|
||||
type Identifier struct {
|
||||
position *Position
|
||||
comments []comment.Comment
|
||||
Value string
|
||||
}
|
||||
|
||||
func NewIdentifier(Value string) *Identifier {
|
||||
return &Identifier{
|
||||
nil,
|
||||
nil,
|
||||
Value,
|
||||
}
|
||||
@ -31,15 +27,6 @@ func (n *Identifier) SetPosition(p *Position) Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Identifier) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *Identifier) SetComments(c []comment.Comment) Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Identifier) Walk(v Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -11,7 +11,6 @@ type FullyQualified struct {
|
||||
func NewFullyQualified(Parts []node.Node) *FullyQualified {
|
||||
return &FullyQualified{
|
||||
Name{
|
||||
nil,
|
||||
nil,
|
||||
Parts,
|
||||
},
|
||||
|
@ -1,19 +1,16 @@
|
||||
package name
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
type Name struct {
|
||||
position *node.Position
|
||||
comments []comment.Comment
|
||||
Parts []node.Node
|
||||
}
|
||||
|
||||
func NewName(Parts []node.Node) *Name {
|
||||
return &Name{
|
||||
nil,
|
||||
nil,
|
||||
Parts,
|
||||
}
|
||||
@ -32,15 +29,6 @@ func (n *Name) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Name) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *Name) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Name) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
@ -1,19 +1,16 @@
|
||||
package name
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/comment"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
)
|
||||
|
||||
type NamePart struct {
|
||||
position *node.Position
|
||||
comments []comment.Comment
|
||||
Value string
|
||||
}
|
||||
|
||||
func NewNamePart(Value string) *NamePart {
|
||||
return &NamePart{
|
||||
nil,
|
||||
nil,
|
||||
Value,
|
||||
}
|
||||
@ -34,15 +31,6 @@ func (n *NamePart) SetPosition(p *node.Position) node.Node {
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *NamePart) Comments() []comment.Comment {
|
||||
return n.comments
|
||||
}
|
||||
|
||||
func (n *NamePart) SetComments(c []comment.Comment) node.Node {
|
||||
n.comments = c
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *NamePart) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user