extract comments package
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user