node constructors return concrete type

This commit is contained in:
z7zmey
2018-01-08 21:18:09 +02:00
parent f2cf2061ee
commit 855665b565
156 changed files with 156 additions and 156 deletions

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,