node constructors return concrete type
This commit is contained in:
@@ -9,7 +9,7 @@ type Assign struct {
|
||||
AssignOp
|
||||
}
|
||||
|
||||
func NewAssign(Variable node.Node, Expression node.Node) node.Node {
|
||||
func NewAssign(Variable node.Node, Expression node.Node) *Assign {
|
||||
return &Assign{
|
||||
AssignOp{
|
||||
nil,
|
||||
|
||||
@@ -9,7 +9,7 @@ type AssignRef struct {
|
||||
AssignOp
|
||||
}
|
||||
|
||||
func NewAssignRef(Variable node.Node, Expression node.Node) node.Node {
|
||||
func NewAssignRef(Variable node.Node, Expression node.Node) *AssignRef {
|
||||
return &AssignRef{
|
||||
AssignOp{
|
||||
nil,
|
||||
|
||||
@@ -9,7 +9,7 @@ type BitwiseAnd struct {
|
||||
AssignOp
|
||||
}
|
||||
|
||||
func NewBitwiseAnd(Variable node.Node, Expression node.Node) node.Node {
|
||||
func NewBitwiseAnd(Variable node.Node, Expression node.Node) *BitwiseAnd {
|
||||
return &BitwiseAnd{
|
||||
AssignOp{
|
||||
nil,
|
||||
|
||||
@@ -9,7 +9,7 @@ type BitwiseOr struct {
|
||||
AssignOp
|
||||
}
|
||||
|
||||
func NewBitwiseOr(Variable node.Node, Expression node.Node) node.Node {
|
||||
func NewBitwiseOr(Variable node.Node, Expression node.Node) *BitwiseOr {
|
||||
return &BitwiseOr{
|
||||
AssignOp{
|
||||
nil,
|
||||
|
||||
@@ -9,7 +9,7 @@ type BitwiseXor struct {
|
||||
AssignOp
|
||||
}
|
||||
|
||||
func NewBitwiseXor(Variable node.Node, Expression node.Node) node.Node {
|
||||
func NewBitwiseXor(Variable node.Node, Expression node.Node) *BitwiseXor {
|
||||
return &BitwiseXor{
|
||||
AssignOp{
|
||||
nil,
|
||||
|
||||
@@ -9,7 +9,7 @@ type Concat struct {
|
||||
AssignOp
|
||||
}
|
||||
|
||||
func NewConcat(Variable node.Node, Expression node.Node) node.Node {
|
||||
func NewConcat(Variable node.Node, Expression node.Node) *Concat {
|
||||
return &Concat{
|
||||
AssignOp{
|
||||
nil,
|
||||
|
||||
@@ -9,7 +9,7 @@ type Div struct {
|
||||
AssignOp
|
||||
}
|
||||
|
||||
func NewDiv(Variable node.Node, Expression node.Node) node.Node {
|
||||
func NewDiv(Variable node.Node, Expression node.Node) *Div {
|
||||
return &Div{
|
||||
AssignOp{
|
||||
nil,
|
||||
|
||||
@@ -9,7 +9,7 @@ type Minus struct {
|
||||
AssignOp
|
||||
}
|
||||
|
||||
func NewMinus(Variable node.Node, Expression node.Node) node.Node {
|
||||
func NewMinus(Variable node.Node, Expression node.Node) *Minus {
|
||||
return &Minus{
|
||||
AssignOp{
|
||||
nil,
|
||||
|
||||
@@ -9,7 +9,7 @@ type Mod struct {
|
||||
AssignOp
|
||||
}
|
||||
|
||||
func NewMod(Variable node.Node, Expression node.Node) node.Node {
|
||||
func NewMod(Variable node.Node, Expression node.Node) *Mod {
|
||||
return &Mod{
|
||||
AssignOp{
|
||||
nil,
|
||||
|
||||
@@ -9,7 +9,7 @@ type Mul struct {
|
||||
AssignOp
|
||||
}
|
||||
|
||||
func NewMul(Variable node.Node, Expression node.Node) node.Node {
|
||||
func NewMul(Variable node.Node, Expression node.Node) *Mul {
|
||||
return &Mul{
|
||||
AssignOp{
|
||||
nil,
|
||||
|
||||
@@ -9,7 +9,7 @@ type Plus struct {
|
||||
AssignOp
|
||||
}
|
||||
|
||||
func NewPlus(Variable node.Node, Expression node.Node) node.Node {
|
||||
func NewPlus(Variable node.Node, Expression node.Node) *Plus {
|
||||
return &Plus{
|
||||
AssignOp{
|
||||
nil,
|
||||
|
||||
@@ -9,7 +9,7 @@ type Pow struct {
|
||||
AssignOp
|
||||
}
|
||||
|
||||
func NewPow(Variable node.Node, Expression node.Node) node.Node {
|
||||
func NewPow(Variable node.Node, Expression node.Node) *Pow {
|
||||
return &Pow{
|
||||
AssignOp{
|
||||
nil,
|
||||
|
||||
@@ -9,7 +9,7 @@ type ShiftLeft struct {
|
||||
AssignOp
|
||||
}
|
||||
|
||||
func NewShiftLeft(Variable node.Node, Expression node.Node) node.Node {
|
||||
func NewShiftLeft(Variable node.Node, Expression node.Node) *ShiftLeft {
|
||||
return &ShiftLeft{
|
||||
AssignOp{
|
||||
nil,
|
||||
|
||||
@@ -9,7 +9,7 @@ type ShiftRight struct {
|
||||
AssignOp
|
||||
}
|
||||
|
||||
func NewShiftRight(Variable node.Node, Expression node.Node) node.Node {
|
||||
func NewShiftRight(Variable node.Node, Expression node.Node) *ShiftRight {
|
||||
return &ShiftRight{
|
||||
AssignOp{
|
||||
nil,
|
||||
|
||||
Reference in New Issue
Block a user