node constructors return concrete type
This commit is contained in:
@@ -9,7 +9,7 @@ type BitwiseAnd struct {
|
||||
BinaryOp
|
||||
}
|
||||
|
||||
func NewBitwiseAnd(Variable node.Node, Expression node.Node) node.Node {
|
||||
func NewBitwiseAnd(Variable node.Node, Expression node.Node) *BitwiseAnd {
|
||||
return &BitwiseAnd{
|
||||
BinaryOp{
|
||||
nil,
|
||||
|
||||
@@ -9,7 +9,7 @@ type BitwiseOr struct {
|
||||
BinaryOp
|
||||
}
|
||||
|
||||
func NewBitwiseOr(Variable node.Node, Expression node.Node) node.Node {
|
||||
func NewBitwiseOr(Variable node.Node, Expression node.Node) *BitwiseOr {
|
||||
return &BitwiseOr{
|
||||
BinaryOp{
|
||||
nil,
|
||||
|
||||
@@ -9,7 +9,7 @@ type BitwiseXor struct {
|
||||
BinaryOp
|
||||
}
|
||||
|
||||
func NewBitwiseXor(Variable node.Node, Expression node.Node) node.Node {
|
||||
func NewBitwiseXor(Variable node.Node, Expression node.Node) *BitwiseXor {
|
||||
return &BitwiseXor{
|
||||
BinaryOp{
|
||||
nil,
|
||||
|
||||
@@ -9,7 +9,7 @@ type BooleanAnd struct {
|
||||
BinaryOp
|
||||
}
|
||||
|
||||
func NewBooleanAnd(Variable node.Node, Expression node.Node) node.Node {
|
||||
func NewBooleanAnd(Variable node.Node, Expression node.Node) *BooleanAnd {
|
||||
return &BooleanAnd{
|
||||
BinaryOp{
|
||||
nil,
|
||||
|
||||
@@ -9,7 +9,7 @@ type BooleanOr struct {
|
||||
BinaryOp
|
||||
}
|
||||
|
||||
func NewBooleanOr(Variable node.Node, Expression node.Node) node.Node {
|
||||
func NewBooleanOr(Variable node.Node, Expression node.Node) *BooleanOr {
|
||||
return &BooleanOr{
|
||||
BinaryOp{
|
||||
nil,
|
||||
|
||||
@@ -9,7 +9,7 @@ type Coalesce struct {
|
||||
BinaryOp
|
||||
}
|
||||
|
||||
func NewCoalesce(Variable node.Node, Expression node.Node) node.Node {
|
||||
func NewCoalesce(Variable node.Node, Expression node.Node) *Coalesce {
|
||||
return &Coalesce{
|
||||
BinaryOp{
|
||||
nil,
|
||||
|
||||
@@ -9,7 +9,7 @@ type Concat struct {
|
||||
BinaryOp
|
||||
}
|
||||
|
||||
func NewConcat(Variable node.Node, Expression node.Node) node.Node {
|
||||
func NewConcat(Variable node.Node, Expression node.Node) *Concat {
|
||||
return &Concat{
|
||||
BinaryOp{
|
||||
nil,
|
||||
|
||||
@@ -9,7 +9,7 @@ type Div struct {
|
||||
BinaryOp
|
||||
}
|
||||
|
||||
func NewDiv(Variable node.Node, Expression node.Node) node.Node {
|
||||
func NewDiv(Variable node.Node, Expression node.Node) *Div {
|
||||
return &Div{
|
||||
BinaryOp{
|
||||
nil,
|
||||
|
||||
@@ -9,7 +9,7 @@ type Equal struct {
|
||||
BinaryOp
|
||||
}
|
||||
|
||||
func NewEqual(Variable node.Node, Expression node.Node) node.Node {
|
||||
func NewEqual(Variable node.Node, Expression node.Node) *Equal {
|
||||
return &Equal{
|
||||
BinaryOp{
|
||||
nil,
|
||||
|
||||
@@ -9,7 +9,7 @@ type Greater struct {
|
||||
BinaryOp
|
||||
}
|
||||
|
||||
func NewGreater(Variable node.Node, Expression node.Node) node.Node {
|
||||
func NewGreater(Variable node.Node, Expression node.Node) *Greater {
|
||||
return &Greater{
|
||||
BinaryOp{
|
||||
nil,
|
||||
|
||||
@@ -9,7 +9,7 @@ type GreaterOrEqual struct {
|
||||
BinaryOp
|
||||
}
|
||||
|
||||
func NewGreaterOrEqual(Variable node.Node, Expression node.Node) node.Node {
|
||||
func NewGreaterOrEqual(Variable node.Node, Expression node.Node) *GreaterOrEqual {
|
||||
return &GreaterOrEqual{
|
||||
BinaryOp{
|
||||
nil,
|
||||
|
||||
@@ -9,7 +9,7 @@ type Identical struct {
|
||||
BinaryOp
|
||||
}
|
||||
|
||||
func NewIdentical(Variable node.Node, Expression node.Node) node.Node {
|
||||
func NewIdentical(Variable node.Node, Expression node.Node) *Identical {
|
||||
return &Identical{
|
||||
BinaryOp{
|
||||
nil,
|
||||
|
||||
@@ -9,7 +9,7 @@ type LogicalAnd struct {
|
||||
BinaryOp
|
||||
}
|
||||
|
||||
func NewLogicalAnd(Variable node.Node, Expression node.Node) node.Node {
|
||||
func NewLogicalAnd(Variable node.Node, Expression node.Node) *LogicalAnd {
|
||||
return &LogicalAnd{
|
||||
BinaryOp{
|
||||
nil,
|
||||
|
||||
@@ -9,7 +9,7 @@ type LogicalOr struct {
|
||||
BinaryOp
|
||||
}
|
||||
|
||||
func NewLogicalOr(Variable node.Node, Expression node.Node) node.Node {
|
||||
func NewLogicalOr(Variable node.Node, Expression node.Node) *LogicalOr {
|
||||
return &LogicalOr{
|
||||
BinaryOp{
|
||||
nil,
|
||||
|
||||
@@ -9,7 +9,7 @@ type LogicalXor struct {
|
||||
BinaryOp
|
||||
}
|
||||
|
||||
func NewLogicalXor(Variable node.Node, Expression node.Node) node.Node {
|
||||
func NewLogicalXor(Variable node.Node, Expression node.Node) *LogicalXor {
|
||||
return &LogicalXor{
|
||||
BinaryOp{
|
||||
nil,
|
||||
|
||||
@@ -9,7 +9,7 @@ type Minus struct {
|
||||
BinaryOp
|
||||
}
|
||||
|
||||
func NewMinus(Variable node.Node, Expression node.Node) node.Node {
|
||||
func NewMinus(Variable node.Node, Expression node.Node) *Minus {
|
||||
return &Minus{
|
||||
BinaryOp{
|
||||
nil,
|
||||
|
||||
@@ -9,7 +9,7 @@ type Mod struct {
|
||||
BinaryOp
|
||||
}
|
||||
|
||||
func NewMod(Variable node.Node, Expression node.Node) node.Node {
|
||||
func NewMod(Variable node.Node, Expression node.Node) *Mod {
|
||||
return &Mod{
|
||||
BinaryOp{
|
||||
nil,
|
||||
|
||||
@@ -9,7 +9,7 @@ type Mul struct {
|
||||
BinaryOp
|
||||
}
|
||||
|
||||
func NewMul(Variable node.Node, Expression node.Node) node.Node {
|
||||
func NewMul(Variable node.Node, Expression node.Node) *Mul {
|
||||
return &Mul{
|
||||
BinaryOp{
|
||||
nil,
|
||||
|
||||
@@ -9,7 +9,7 @@ type NotEqual struct {
|
||||
BinaryOp
|
||||
}
|
||||
|
||||
func NewNotEqual(Variable node.Node, Expression node.Node) node.Node {
|
||||
func NewNotEqual(Variable node.Node, Expression node.Node) *NotEqual {
|
||||
return &NotEqual{
|
||||
BinaryOp{
|
||||
nil,
|
||||
|
||||
@@ -9,7 +9,7 @@ type NotIdentical struct {
|
||||
BinaryOp
|
||||
}
|
||||
|
||||
func NewNotIdentical(Variable node.Node, Expression node.Node) node.Node {
|
||||
func NewNotIdentical(Variable node.Node, Expression node.Node) *NotIdentical {
|
||||
return &NotIdentical{
|
||||
BinaryOp{
|
||||
nil,
|
||||
|
||||
@@ -9,7 +9,7 @@ type Plus struct {
|
||||
BinaryOp
|
||||
}
|
||||
|
||||
func NewPlus(Variable node.Node, Expression node.Node) node.Node {
|
||||
func NewPlus(Variable node.Node, Expression node.Node) *Plus {
|
||||
return &Plus{
|
||||
BinaryOp{
|
||||
nil,
|
||||
|
||||
@@ -9,7 +9,7 @@ type Pow struct {
|
||||
BinaryOp
|
||||
}
|
||||
|
||||
func NewPow(Variable node.Node, Expression node.Node) node.Node {
|
||||
func NewPow(Variable node.Node, Expression node.Node) *Pow {
|
||||
return &Pow{
|
||||
BinaryOp{
|
||||
nil,
|
||||
|
||||
@@ -9,7 +9,7 @@ type ShiftLeft struct {
|
||||
BinaryOp
|
||||
}
|
||||
|
||||
func NewShiftLeft(Variable node.Node, Expression node.Node) node.Node {
|
||||
func NewShiftLeft(Variable node.Node, Expression node.Node) *ShiftLeft {
|
||||
return &ShiftLeft{
|
||||
BinaryOp{
|
||||
nil,
|
||||
|
||||
@@ -9,7 +9,7 @@ type ShiftRight struct {
|
||||
BinaryOp
|
||||
}
|
||||
|
||||
func NewShiftRight(Variable node.Node, Expression node.Node) node.Node {
|
||||
func NewShiftRight(Variable node.Node, Expression node.Node) *ShiftRight {
|
||||
return &ShiftRight{
|
||||
BinaryOp{
|
||||
nil,
|
||||
|
||||
@@ -9,7 +9,7 @@ type Smaller struct {
|
||||
BinaryOp
|
||||
}
|
||||
|
||||
func NewSmaller(Variable node.Node, Expression node.Node) node.Node {
|
||||
func NewSmaller(Variable node.Node, Expression node.Node) *Smaller {
|
||||
return &Smaller{
|
||||
BinaryOp{
|
||||
nil,
|
||||
|
||||
@@ -9,7 +9,7 @@ type SmallerOrEqual struct {
|
||||
BinaryOp
|
||||
}
|
||||
|
||||
func NewSmallerOrEqual(Variable node.Node, Expression node.Node) node.Node {
|
||||
func NewSmallerOrEqual(Variable node.Node, Expression node.Node) *SmallerOrEqual {
|
||||
return &SmallerOrEqual{
|
||||
BinaryOp{
|
||||
nil,
|
||||
|
||||
@@ -9,7 +9,7 @@ type Spaceship struct {
|
||||
BinaryOp
|
||||
}
|
||||
|
||||
func NewSpaceship(Variable node.Node, Expression node.Node) node.Node {
|
||||
func NewSpaceship(Variable node.Node, Expression node.Node) *Spaceship {
|
||||
return &Spaceship{
|
||||
BinaryOp{
|
||||
nil,
|
||||
|
||||
Reference in New Issue
Block a user