add comments

This commit is contained in:
z7zmey
2018-01-11 19:33:25 +02:00
parent 0676e0cb5a
commit e814483f37
158 changed files with 771 additions and 2 deletions

View File

@@ -4,6 +4,7 @@ import (
"github.com/z7zmey/php-parser/node"
)
// Cast node
type Cast struct {
Expr node.Node
}

View File

@@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node"
)
// CastArray node
type CastArray struct {
Cast
}
// NewCastArray node constuctor
func NewCastArray(Expr node.Node) *CastArray {
return &CastArray{
Cast{
@@ -16,10 +18,13 @@ func NewCastArray(Expr node.Node) *CastArray {
}
}
// Attributes returns node attributes as map
func (n *CastArray) Attributes() map[string]interface{} {
return nil
}
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *CastArray) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node"
)
// CastBool node
type CastBool struct {
Cast
}
// NewCastBool node constuctor
func NewCastBool(Expr node.Node) *CastBool {
return &CastBool{
Cast{
@@ -16,10 +18,13 @@ func NewCastBool(Expr node.Node) *CastBool {
}
}
// Attributes returns node attributes as map
func (n *CastBool) Attributes() map[string]interface{} {
return nil
}
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *CastBool) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node"
)
// CastDouble node
type CastDouble struct {
Cast
}
// NewCastDouble node constuctor
func NewCastDouble(Expr node.Node) *CastDouble {
return &CastDouble{
Cast{
@@ -16,10 +18,13 @@ func NewCastDouble(Expr node.Node) *CastDouble {
}
}
// Attributes returns node attributes as map
func (n *CastDouble) Attributes() map[string]interface{} {
return nil
}
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *CastDouble) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node"
)
// CastInt node
type CastInt struct {
Cast
}
// NewCastInt node constuctor
func NewCastInt(Expr node.Node) *CastInt {
return &CastInt{
Cast{
@@ -16,10 +18,13 @@ func NewCastInt(Expr node.Node) *CastInt {
}
}
// Attributes returns node attributes as map
func (n *CastInt) Attributes() map[string]interface{} {
return nil
}
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *CastInt) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node"
)
// CastObject node
type CastObject struct {
Cast
}
// NewCastObject node constuctor
func NewCastObject(Expr node.Node) *CastObject {
return &CastObject{
Cast{
@@ -16,10 +18,13 @@ func NewCastObject(Expr node.Node) *CastObject {
}
}
// Attributes returns node attributes as map
func (n *CastObject) Attributes() map[string]interface{} {
return nil
}
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *CastObject) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node"
)
// CastString node
type CastString struct {
Cast
}
// NewCastString node constuctor
func NewCastString(Expr node.Node) *CastString {
return &CastString{
Cast{
@@ -16,10 +18,13 @@ func NewCastString(Expr node.Node) *CastString {
}
}
// Attributes returns node attributes as map
func (n *CastString) Attributes() map[string]interface{} {
return nil
}
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *CastString) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node"
)
// CastUnset node
type CastUnset struct {
Cast
}
// NewCastUnset node constuctor
func NewCastUnset(Expr node.Node) *CastUnset {
return &CastUnset{
Cast{
@@ -16,10 +18,13 @@ func NewCastUnset(Expr node.Node) *CastUnset {
}
}
// Attributes returns node attributes as map
func (n *CastUnset) Attributes() map[string]interface{} {
return nil
}
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *CastUnset) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return