#25: save position within node
This commit is contained in:
@@ -2,23 +2,35 @@ package binary
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
"github.com/z7zmey/php-parser/position"
|
||||
"github.com/z7zmey/php-parser/walker"
|
||||
)
|
||||
|
||||
// BitwiseAnd node
|
||||
type BitwiseAnd struct {
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
Position *position.Position
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
}
|
||||
|
||||
// NewBitwiseAnd node constructor
|
||||
func NewBitwiseAnd(Variable node.Node, Expression node.Node) *BitwiseAnd {
|
||||
return &BitwiseAnd{
|
||||
Variable,
|
||||
Expression,
|
||||
Left: Variable,
|
||||
Right: Expression,
|
||||
}
|
||||
}
|
||||
|
||||
// SetPosition sets node position
|
||||
func (n *BitwiseAnd) SetPosition(p *position.Position) {
|
||||
n.Position = p
|
||||
}
|
||||
|
||||
// GetPosition returns node positions
|
||||
func (n *BitwiseAnd) GetPosition() *position.Position {
|
||||
return n.Position
|
||||
}
|
||||
|
||||
// Attributes returns node attributes as map
|
||||
func (n *BitwiseAnd) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
|
||||
@@ -2,23 +2,35 @@ package binary
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
"github.com/z7zmey/php-parser/position"
|
||||
"github.com/z7zmey/php-parser/walker"
|
||||
)
|
||||
|
||||
// BitwiseOr node
|
||||
type BitwiseOr struct {
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
Position *position.Position
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
}
|
||||
|
||||
// NewBitwiseOr node constructor
|
||||
func NewBitwiseOr(Variable node.Node, Expression node.Node) *BitwiseOr {
|
||||
return &BitwiseOr{
|
||||
Variable,
|
||||
Expression,
|
||||
Left: Variable,
|
||||
Right: Expression,
|
||||
}
|
||||
}
|
||||
|
||||
// SetPosition sets node position
|
||||
func (n *BitwiseOr) SetPosition(p *position.Position) {
|
||||
n.Position = p
|
||||
}
|
||||
|
||||
// GetPosition returns node positions
|
||||
func (n *BitwiseOr) GetPosition() *position.Position {
|
||||
return n.Position
|
||||
}
|
||||
|
||||
// Attributes returns node attributes as map
|
||||
func (n *BitwiseOr) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
|
||||
@@ -2,23 +2,35 @@ package binary
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
"github.com/z7zmey/php-parser/position"
|
||||
"github.com/z7zmey/php-parser/walker"
|
||||
)
|
||||
|
||||
// BitwiseXor node
|
||||
type BitwiseXor struct {
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
Position *position.Position
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
}
|
||||
|
||||
// NewBitwiseXor node constructor
|
||||
func NewBitwiseXor(Variable node.Node, Expression node.Node) *BitwiseXor {
|
||||
return &BitwiseXor{
|
||||
Variable,
|
||||
Expression,
|
||||
Left: Variable,
|
||||
Right: Expression,
|
||||
}
|
||||
}
|
||||
|
||||
// SetPosition sets node position
|
||||
func (n *BitwiseXor) SetPosition(p *position.Position) {
|
||||
n.Position = p
|
||||
}
|
||||
|
||||
// GetPosition returns node positions
|
||||
func (n *BitwiseXor) GetPosition() *position.Position {
|
||||
return n.Position
|
||||
}
|
||||
|
||||
// Attributes returns node attributes as map
|
||||
func (n *BitwiseXor) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
|
||||
@@ -2,23 +2,35 @@ package binary
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
"github.com/z7zmey/php-parser/position"
|
||||
"github.com/z7zmey/php-parser/walker"
|
||||
)
|
||||
|
||||
// BooleanAnd node
|
||||
type BooleanAnd struct {
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
Position *position.Position
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
}
|
||||
|
||||
// NewBooleanAnd node constructor
|
||||
func NewBooleanAnd(Variable node.Node, Expression node.Node) *BooleanAnd {
|
||||
return &BooleanAnd{
|
||||
Variable,
|
||||
Expression,
|
||||
Left: Variable,
|
||||
Right: Expression,
|
||||
}
|
||||
}
|
||||
|
||||
// SetPosition sets node position
|
||||
func (n *BooleanAnd) SetPosition(p *position.Position) {
|
||||
n.Position = p
|
||||
}
|
||||
|
||||
// GetPosition returns node positions
|
||||
func (n *BooleanAnd) GetPosition() *position.Position {
|
||||
return n.Position
|
||||
}
|
||||
|
||||
// Attributes returns node attributes as map
|
||||
func (n *BooleanAnd) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
|
||||
@@ -2,23 +2,35 @@ package binary
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
"github.com/z7zmey/php-parser/position"
|
||||
"github.com/z7zmey/php-parser/walker"
|
||||
)
|
||||
|
||||
// BooleanOr node
|
||||
type BooleanOr struct {
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
Position *position.Position
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
}
|
||||
|
||||
// NewBooleanOr node constructor
|
||||
func NewBooleanOr(Variable node.Node, Expression node.Node) *BooleanOr {
|
||||
return &BooleanOr{
|
||||
Variable,
|
||||
Expression,
|
||||
Left: Variable,
|
||||
Right: Expression,
|
||||
}
|
||||
}
|
||||
|
||||
// SetPosition sets node position
|
||||
func (n *BooleanOr) SetPosition(p *position.Position) {
|
||||
n.Position = p
|
||||
}
|
||||
|
||||
// GetPosition returns node positions
|
||||
func (n *BooleanOr) GetPosition() *position.Position {
|
||||
return n.Position
|
||||
}
|
||||
|
||||
// Attributes returns node attributes as map
|
||||
func (n *BooleanOr) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
|
||||
@@ -2,23 +2,35 @@ package binary
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
"github.com/z7zmey/php-parser/position"
|
||||
"github.com/z7zmey/php-parser/walker"
|
||||
)
|
||||
|
||||
// Coalesce node
|
||||
type Coalesce struct {
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
Position *position.Position
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
}
|
||||
|
||||
// NewCoalesce node constructor
|
||||
func NewCoalesce(Variable node.Node, Expression node.Node) *Coalesce {
|
||||
return &Coalesce{
|
||||
Variable,
|
||||
Expression,
|
||||
Left: Variable,
|
||||
Right: Expression,
|
||||
}
|
||||
}
|
||||
|
||||
// SetPosition sets node position
|
||||
func (n *Coalesce) SetPosition(p *position.Position) {
|
||||
n.Position = p
|
||||
}
|
||||
|
||||
// GetPosition returns node positions
|
||||
func (n *Coalesce) GetPosition() *position.Position {
|
||||
return n.Position
|
||||
}
|
||||
|
||||
// Attributes returns node attributes as map
|
||||
func (n *Coalesce) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
|
||||
@@ -2,23 +2,35 @@ package binary
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
"github.com/z7zmey/php-parser/position"
|
||||
"github.com/z7zmey/php-parser/walker"
|
||||
)
|
||||
|
||||
// Concat node
|
||||
type Concat struct {
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
Position *position.Position
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
}
|
||||
|
||||
// NewConcat node constructor
|
||||
func NewConcat(Variable node.Node, Expression node.Node) *Concat {
|
||||
return &Concat{
|
||||
Variable,
|
||||
Expression,
|
||||
Left: Variable,
|
||||
Right: Expression,
|
||||
}
|
||||
}
|
||||
|
||||
// SetPosition sets node position
|
||||
func (n *Concat) SetPosition(p *position.Position) {
|
||||
n.Position = p
|
||||
}
|
||||
|
||||
// GetPosition returns node positions
|
||||
func (n *Concat) GetPosition() *position.Position {
|
||||
return n.Position
|
||||
}
|
||||
|
||||
// Attributes returns node attributes as map
|
||||
func (n *Concat) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
|
||||
@@ -2,23 +2,35 @@ package binary
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
"github.com/z7zmey/php-parser/position"
|
||||
"github.com/z7zmey/php-parser/walker"
|
||||
)
|
||||
|
||||
// Div node
|
||||
type Div struct {
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
Position *position.Position
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
}
|
||||
|
||||
// NewDiv node constructor
|
||||
func NewDiv(Variable node.Node, Expression node.Node) *Div {
|
||||
return &Div{
|
||||
Variable,
|
||||
Expression,
|
||||
Left: Variable,
|
||||
Right: Expression,
|
||||
}
|
||||
}
|
||||
|
||||
// SetPosition sets node position
|
||||
func (n *Div) SetPosition(p *position.Position) {
|
||||
n.Position = p
|
||||
}
|
||||
|
||||
// GetPosition returns node positions
|
||||
func (n *Div) GetPosition() *position.Position {
|
||||
return n.Position
|
||||
}
|
||||
|
||||
// Attributes returns node attributes as map
|
||||
func (n *Div) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
|
||||
@@ -2,23 +2,35 @@ package binary
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
"github.com/z7zmey/php-parser/position"
|
||||
"github.com/z7zmey/php-parser/walker"
|
||||
)
|
||||
|
||||
// Equal node
|
||||
type Equal struct {
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
Position *position.Position
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
}
|
||||
|
||||
// NewEqual node constructor
|
||||
func NewEqual(Variable node.Node, Expression node.Node) *Equal {
|
||||
return &Equal{
|
||||
Variable,
|
||||
Expression,
|
||||
Left: Variable,
|
||||
Right: Expression,
|
||||
}
|
||||
}
|
||||
|
||||
// SetPosition sets node position
|
||||
func (n *Equal) SetPosition(p *position.Position) {
|
||||
n.Position = p
|
||||
}
|
||||
|
||||
// GetPosition returns node positions
|
||||
func (n *Equal) GetPosition() *position.Position {
|
||||
return n.Position
|
||||
}
|
||||
|
||||
// Attributes returns node attributes as map
|
||||
func (n *Equal) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
|
||||
@@ -2,23 +2,35 @@ package binary
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
"github.com/z7zmey/php-parser/position"
|
||||
"github.com/z7zmey/php-parser/walker"
|
||||
)
|
||||
|
||||
// Greater node
|
||||
type Greater struct {
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
Position *position.Position
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
}
|
||||
|
||||
// NewGreater node constructor
|
||||
func NewGreater(Variable node.Node, Expression node.Node) *Greater {
|
||||
return &Greater{
|
||||
Variable,
|
||||
Expression,
|
||||
Left: Variable,
|
||||
Right: Expression,
|
||||
}
|
||||
}
|
||||
|
||||
// SetPosition sets node position
|
||||
func (n *Greater) SetPosition(p *position.Position) {
|
||||
n.Position = p
|
||||
}
|
||||
|
||||
// GetPosition returns node positions
|
||||
func (n *Greater) GetPosition() *position.Position {
|
||||
return n.Position
|
||||
}
|
||||
|
||||
// Attributes returns node attributes as map
|
||||
func (n *Greater) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
|
||||
@@ -2,23 +2,35 @@ package binary
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
"github.com/z7zmey/php-parser/position"
|
||||
"github.com/z7zmey/php-parser/walker"
|
||||
)
|
||||
|
||||
// GreaterOrEqual node
|
||||
type GreaterOrEqual struct {
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
Position *position.Position
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
}
|
||||
|
||||
// NewGreaterOrEqual node constructor
|
||||
func NewGreaterOrEqual(Variable node.Node, Expression node.Node) *GreaterOrEqual {
|
||||
return &GreaterOrEqual{
|
||||
Variable,
|
||||
Expression,
|
||||
Left: Variable,
|
||||
Right: Expression,
|
||||
}
|
||||
}
|
||||
|
||||
// SetPosition sets node position
|
||||
func (n *GreaterOrEqual) SetPosition(p *position.Position) {
|
||||
n.Position = p
|
||||
}
|
||||
|
||||
// GetPosition returns node positions
|
||||
func (n *GreaterOrEqual) GetPosition() *position.Position {
|
||||
return n.Position
|
||||
}
|
||||
|
||||
// Attributes returns node attributes as map
|
||||
func (n *GreaterOrEqual) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
|
||||
@@ -2,23 +2,35 @@ package binary
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
"github.com/z7zmey/php-parser/position"
|
||||
"github.com/z7zmey/php-parser/walker"
|
||||
)
|
||||
|
||||
// Identical node
|
||||
type Identical struct {
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
Position *position.Position
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
}
|
||||
|
||||
// NewIdentical node constructor
|
||||
func NewIdentical(Variable node.Node, Expression node.Node) *Identical {
|
||||
return &Identical{
|
||||
Variable,
|
||||
Expression,
|
||||
Left: Variable,
|
||||
Right: Expression,
|
||||
}
|
||||
}
|
||||
|
||||
// SetPosition sets node position
|
||||
func (n *Identical) SetPosition(p *position.Position) {
|
||||
n.Position = p
|
||||
}
|
||||
|
||||
// GetPosition returns node positions
|
||||
func (n *Identical) GetPosition() *position.Position {
|
||||
return n.Position
|
||||
}
|
||||
|
||||
// Attributes returns node attributes as map
|
||||
func (n *Identical) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
|
||||
@@ -2,23 +2,35 @@ package binary
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
"github.com/z7zmey/php-parser/position"
|
||||
"github.com/z7zmey/php-parser/walker"
|
||||
)
|
||||
|
||||
// LogicalAnd node
|
||||
type LogicalAnd struct {
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
Position *position.Position
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
}
|
||||
|
||||
// NewLogicalAnd node constructor
|
||||
func NewLogicalAnd(Variable node.Node, Expression node.Node) *LogicalAnd {
|
||||
return &LogicalAnd{
|
||||
Variable,
|
||||
Expression,
|
||||
Left: Variable,
|
||||
Right: Expression,
|
||||
}
|
||||
}
|
||||
|
||||
// SetPosition sets node position
|
||||
func (n *LogicalAnd) SetPosition(p *position.Position) {
|
||||
n.Position = p
|
||||
}
|
||||
|
||||
// GetPosition returns node positions
|
||||
func (n *LogicalAnd) GetPosition() *position.Position {
|
||||
return n.Position
|
||||
}
|
||||
|
||||
// Attributes returns node attributes as map
|
||||
func (n *LogicalAnd) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
|
||||
@@ -2,23 +2,35 @@ package binary
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
"github.com/z7zmey/php-parser/position"
|
||||
"github.com/z7zmey/php-parser/walker"
|
||||
)
|
||||
|
||||
// LogicalOr node
|
||||
type LogicalOr struct {
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
Position *position.Position
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
}
|
||||
|
||||
// NewLogicalOr node constructor
|
||||
func NewLogicalOr(Variable node.Node, Expression node.Node) *LogicalOr {
|
||||
return &LogicalOr{
|
||||
Variable,
|
||||
Expression,
|
||||
Left: Variable,
|
||||
Right: Expression,
|
||||
}
|
||||
}
|
||||
|
||||
// SetPosition sets node position
|
||||
func (n *LogicalOr) SetPosition(p *position.Position) {
|
||||
n.Position = p
|
||||
}
|
||||
|
||||
// GetPosition returns node positions
|
||||
func (n *LogicalOr) GetPosition() *position.Position {
|
||||
return n.Position
|
||||
}
|
||||
|
||||
// Attributes returns node attributes as map
|
||||
func (n *LogicalOr) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
|
||||
@@ -2,23 +2,35 @@ package binary
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
"github.com/z7zmey/php-parser/position"
|
||||
"github.com/z7zmey/php-parser/walker"
|
||||
)
|
||||
|
||||
// LogicalXor node
|
||||
type LogicalXor struct {
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
Position *position.Position
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
}
|
||||
|
||||
// NewLogicalXor node constructor
|
||||
func NewLogicalXor(Variable node.Node, Expression node.Node) *LogicalXor {
|
||||
return &LogicalXor{
|
||||
Variable,
|
||||
Expression,
|
||||
Left: Variable,
|
||||
Right: Expression,
|
||||
}
|
||||
}
|
||||
|
||||
// SetPosition sets node position
|
||||
func (n *LogicalXor) SetPosition(p *position.Position) {
|
||||
n.Position = p
|
||||
}
|
||||
|
||||
// GetPosition returns node positions
|
||||
func (n *LogicalXor) GetPosition() *position.Position {
|
||||
return n.Position
|
||||
}
|
||||
|
||||
// Attributes returns node attributes as map
|
||||
func (n *LogicalXor) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
|
||||
@@ -2,23 +2,35 @@ package binary
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
"github.com/z7zmey/php-parser/position"
|
||||
"github.com/z7zmey/php-parser/walker"
|
||||
)
|
||||
|
||||
// Minus node
|
||||
type Minus struct {
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
Position *position.Position
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
}
|
||||
|
||||
// NewMinus node constructor
|
||||
func NewMinus(Variable node.Node, Expression node.Node) *Minus {
|
||||
return &Minus{
|
||||
Variable,
|
||||
Expression,
|
||||
Left: Variable,
|
||||
Right: Expression,
|
||||
}
|
||||
}
|
||||
|
||||
// SetPosition sets node position
|
||||
func (n *Minus) SetPosition(p *position.Position) {
|
||||
n.Position = p
|
||||
}
|
||||
|
||||
// GetPosition returns node positions
|
||||
func (n *Minus) GetPosition() *position.Position {
|
||||
return n.Position
|
||||
}
|
||||
|
||||
// Attributes returns node attributes as map
|
||||
func (n *Minus) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
|
||||
@@ -2,23 +2,35 @@ package binary
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
"github.com/z7zmey/php-parser/position"
|
||||
"github.com/z7zmey/php-parser/walker"
|
||||
)
|
||||
|
||||
// Mod node
|
||||
type Mod struct {
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
Position *position.Position
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
}
|
||||
|
||||
// NewMod node constructor
|
||||
func NewMod(Variable node.Node, Expression node.Node) *Mod {
|
||||
return &Mod{
|
||||
Variable,
|
||||
Expression,
|
||||
Left: Variable,
|
||||
Right: Expression,
|
||||
}
|
||||
}
|
||||
|
||||
// SetPosition sets node position
|
||||
func (n *Mod) SetPosition(p *position.Position) {
|
||||
n.Position = p
|
||||
}
|
||||
|
||||
// GetPosition returns node positions
|
||||
func (n *Mod) GetPosition() *position.Position {
|
||||
return n.Position
|
||||
}
|
||||
|
||||
// Attributes returns node attributes as map
|
||||
func (n *Mod) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
|
||||
@@ -2,23 +2,35 @@ package binary
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
"github.com/z7zmey/php-parser/position"
|
||||
"github.com/z7zmey/php-parser/walker"
|
||||
)
|
||||
|
||||
// Mul node
|
||||
type Mul struct {
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
Position *position.Position
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
}
|
||||
|
||||
// NewMul node constructor
|
||||
func NewMul(Variable node.Node, Expression node.Node) *Mul {
|
||||
return &Mul{
|
||||
Variable,
|
||||
Expression,
|
||||
Left: Variable,
|
||||
Right: Expression,
|
||||
}
|
||||
}
|
||||
|
||||
// SetPosition sets node position
|
||||
func (n *Mul) SetPosition(p *position.Position) {
|
||||
n.Position = p
|
||||
}
|
||||
|
||||
// GetPosition returns node positions
|
||||
func (n *Mul) GetPosition() *position.Position {
|
||||
return n.Position
|
||||
}
|
||||
|
||||
// Attributes returns node attributes as map
|
||||
func (n *Mul) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
|
||||
@@ -2,23 +2,35 @@ package binary
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
"github.com/z7zmey/php-parser/position"
|
||||
"github.com/z7zmey/php-parser/walker"
|
||||
)
|
||||
|
||||
// NotEqual node
|
||||
type NotEqual struct {
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
Position *position.Position
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
}
|
||||
|
||||
// NewNotEqual node constructor
|
||||
func NewNotEqual(Variable node.Node, Expression node.Node) *NotEqual {
|
||||
return &NotEqual{
|
||||
Variable,
|
||||
Expression,
|
||||
Left: Variable,
|
||||
Right: Expression,
|
||||
}
|
||||
}
|
||||
|
||||
// SetPosition sets node position
|
||||
func (n *NotEqual) SetPosition(p *position.Position) {
|
||||
n.Position = p
|
||||
}
|
||||
|
||||
// GetPosition returns node positions
|
||||
func (n *NotEqual) GetPosition() *position.Position {
|
||||
return n.Position
|
||||
}
|
||||
|
||||
// Attributes returns node attributes as map
|
||||
func (n *NotEqual) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
|
||||
@@ -2,23 +2,35 @@ package binary
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
"github.com/z7zmey/php-parser/position"
|
||||
"github.com/z7zmey/php-parser/walker"
|
||||
)
|
||||
|
||||
// NotIdentical node
|
||||
type NotIdentical struct {
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
Position *position.Position
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
}
|
||||
|
||||
// NewNotIdentical node constructor
|
||||
func NewNotIdentical(Variable node.Node, Expression node.Node) *NotIdentical {
|
||||
return &NotIdentical{
|
||||
Variable,
|
||||
Expression,
|
||||
Left: Variable,
|
||||
Right: Expression,
|
||||
}
|
||||
}
|
||||
|
||||
// SetPosition sets node position
|
||||
func (n *NotIdentical) SetPosition(p *position.Position) {
|
||||
n.Position = p
|
||||
}
|
||||
|
||||
// GetPosition returns node positions
|
||||
func (n *NotIdentical) GetPosition() *position.Position {
|
||||
return n.Position
|
||||
}
|
||||
|
||||
// Attributes returns node attributes as map
|
||||
func (n *NotIdentical) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
|
||||
@@ -2,23 +2,35 @@ package binary
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
"github.com/z7zmey/php-parser/position"
|
||||
"github.com/z7zmey/php-parser/walker"
|
||||
)
|
||||
|
||||
// Plus node
|
||||
type Plus struct {
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
Position *position.Position
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
}
|
||||
|
||||
// NewPlus node constructor
|
||||
func NewPlus(Variable node.Node, Expression node.Node) *Plus {
|
||||
return &Plus{
|
||||
Variable,
|
||||
Expression,
|
||||
Left: Variable,
|
||||
Right: Expression,
|
||||
}
|
||||
}
|
||||
|
||||
// SetPosition sets node position
|
||||
func (n *Plus) SetPosition(p *position.Position) {
|
||||
n.Position = p
|
||||
}
|
||||
|
||||
// GetPosition returns node positions
|
||||
func (n *Plus) GetPosition() *position.Position {
|
||||
return n.Position
|
||||
}
|
||||
|
||||
// Attributes returns node attributes as map
|
||||
func (n *Plus) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
|
||||
@@ -2,23 +2,35 @@ package binary
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
"github.com/z7zmey/php-parser/position"
|
||||
"github.com/z7zmey/php-parser/walker"
|
||||
)
|
||||
|
||||
// Pow node
|
||||
type Pow struct {
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
Position *position.Position
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
}
|
||||
|
||||
// NewPow node constructor
|
||||
func NewPow(Variable node.Node, Expression node.Node) *Pow {
|
||||
return &Pow{
|
||||
Variable,
|
||||
Expression,
|
||||
Left: Variable,
|
||||
Right: Expression,
|
||||
}
|
||||
}
|
||||
|
||||
// SetPosition sets node position
|
||||
func (n *Pow) SetPosition(p *position.Position) {
|
||||
n.Position = p
|
||||
}
|
||||
|
||||
// GetPosition returns node positions
|
||||
func (n *Pow) GetPosition() *position.Position {
|
||||
return n.Position
|
||||
}
|
||||
|
||||
// Attributes returns node attributes as map
|
||||
func (n *Pow) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
|
||||
@@ -2,23 +2,35 @@ package binary
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
"github.com/z7zmey/php-parser/position"
|
||||
"github.com/z7zmey/php-parser/walker"
|
||||
)
|
||||
|
||||
// ShiftLeft node
|
||||
type ShiftLeft struct {
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
Position *position.Position
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
}
|
||||
|
||||
// NewShiftLeft node constructor
|
||||
func NewShiftLeft(Variable node.Node, Expression node.Node) *ShiftLeft {
|
||||
return &ShiftLeft{
|
||||
Variable,
|
||||
Expression,
|
||||
Left: Variable,
|
||||
Right: Expression,
|
||||
}
|
||||
}
|
||||
|
||||
// SetPosition sets node position
|
||||
func (n *ShiftLeft) SetPosition(p *position.Position) {
|
||||
n.Position = p
|
||||
}
|
||||
|
||||
// GetPosition returns node positions
|
||||
func (n *ShiftLeft) GetPosition() *position.Position {
|
||||
return n.Position
|
||||
}
|
||||
|
||||
// Attributes returns node attributes as map
|
||||
func (n *ShiftLeft) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
|
||||
@@ -2,23 +2,35 @@ package binary
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
"github.com/z7zmey/php-parser/position"
|
||||
"github.com/z7zmey/php-parser/walker"
|
||||
)
|
||||
|
||||
// ShiftRight node
|
||||
type ShiftRight struct {
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
Position *position.Position
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
}
|
||||
|
||||
// NewShiftRight node constructor
|
||||
func NewShiftRight(Variable node.Node, Expression node.Node) *ShiftRight {
|
||||
return &ShiftRight{
|
||||
Variable,
|
||||
Expression,
|
||||
Left: Variable,
|
||||
Right: Expression,
|
||||
}
|
||||
}
|
||||
|
||||
// SetPosition sets node position
|
||||
func (n *ShiftRight) SetPosition(p *position.Position) {
|
||||
n.Position = p
|
||||
}
|
||||
|
||||
// GetPosition returns node positions
|
||||
func (n *ShiftRight) GetPosition() *position.Position {
|
||||
return n.Position
|
||||
}
|
||||
|
||||
// Attributes returns node attributes as map
|
||||
func (n *ShiftRight) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
|
||||
@@ -2,23 +2,35 @@ package binary
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
"github.com/z7zmey/php-parser/position"
|
||||
"github.com/z7zmey/php-parser/walker"
|
||||
)
|
||||
|
||||
// Smaller node
|
||||
type Smaller struct {
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
Position *position.Position
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
}
|
||||
|
||||
// NewSmaller node constructor
|
||||
func NewSmaller(Variable node.Node, Expression node.Node) *Smaller {
|
||||
return &Smaller{
|
||||
Variable,
|
||||
Expression,
|
||||
Left: Variable,
|
||||
Right: Expression,
|
||||
}
|
||||
}
|
||||
|
||||
// SetPosition sets node position
|
||||
func (n *Smaller) SetPosition(p *position.Position) {
|
||||
n.Position = p
|
||||
}
|
||||
|
||||
// GetPosition returns node positions
|
||||
func (n *Smaller) GetPosition() *position.Position {
|
||||
return n.Position
|
||||
}
|
||||
|
||||
// Attributes returns node attributes as map
|
||||
func (n *Smaller) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
|
||||
@@ -2,23 +2,35 @@ package binary
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
"github.com/z7zmey/php-parser/position"
|
||||
"github.com/z7zmey/php-parser/walker"
|
||||
)
|
||||
|
||||
// SmallerOrEqual node
|
||||
type SmallerOrEqual struct {
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
Position *position.Position
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
}
|
||||
|
||||
// NewSmallerOrEqual node constructor
|
||||
func NewSmallerOrEqual(Variable node.Node, Expression node.Node) *SmallerOrEqual {
|
||||
return &SmallerOrEqual{
|
||||
Variable,
|
||||
Expression,
|
||||
Left: Variable,
|
||||
Right: Expression,
|
||||
}
|
||||
}
|
||||
|
||||
// SetPosition sets node position
|
||||
func (n *SmallerOrEqual) SetPosition(p *position.Position) {
|
||||
n.Position = p
|
||||
}
|
||||
|
||||
// GetPosition returns node positions
|
||||
func (n *SmallerOrEqual) GetPosition() *position.Position {
|
||||
return n.Position
|
||||
}
|
||||
|
||||
// Attributes returns node attributes as map
|
||||
func (n *SmallerOrEqual) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
|
||||
@@ -2,23 +2,35 @@ package binary
|
||||
|
||||
import (
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
"github.com/z7zmey/php-parser/position"
|
||||
"github.com/z7zmey/php-parser/walker"
|
||||
)
|
||||
|
||||
// Spaceship node
|
||||
type Spaceship struct {
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
Position *position.Position
|
||||
Left node.Node
|
||||
Right node.Node
|
||||
}
|
||||
|
||||
// NewSpaceship node constructor
|
||||
func NewSpaceship(Variable node.Node, Expression node.Node) *Spaceship {
|
||||
return &Spaceship{
|
||||
Variable,
|
||||
Expression,
|
||||
Left: Variable,
|
||||
Right: Expression,
|
||||
}
|
||||
}
|
||||
|
||||
// SetPosition sets node position
|
||||
func (n *Spaceship) SetPosition(p *position.Position) {
|
||||
n.Position = p
|
||||
}
|
||||
|
||||
// GetPosition returns node positions
|
||||
func (n *Spaceship) GetPosition() *position.Position {
|
||||
return n.Position
|
||||
}
|
||||
|
||||
// Attributes returns node attributes as map
|
||||
func (n *Spaceship) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user