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 Argument struct {
Expr Node Expr Node
} }
func NewArgument(Expression Node, Variadic bool) Node { func NewArgument(Expression Node, Variadic bool) *Argument {
return &Argument{ return &Argument{
nil, nil,
nil, nil,

View File

@ -11,7 +11,7 @@ type Array struct {
Items []node.Node Items []node.Node
} }
func NewArray(Items []node.Node) node.Node { func NewArray(Items []node.Node) *Array {
return &Array{ return &Array{
nil, nil,
nil, nil,

View File

@ -12,7 +12,7 @@ type ArrayDimFetch struct {
Dim node.Node Dim node.Node
} }
func NewArrayDimFetch(Variable node.Node, Dim node.Node) node.Node { func NewArrayDimFetch(Variable node.Node, Dim node.Node) *ArrayDimFetch {
return &ArrayDimFetch{ return &ArrayDimFetch{
nil, nil,
nil, nil,

View File

@ -13,7 +13,7 @@ type ArrayItem struct {
Val node.Node Val node.Node
} }
func NewArrayItem(Key node.Node, Val node.Node, ByRef bool) node.Node { func NewArrayItem(Key node.Node, Val node.Node, ByRef bool) *ArrayItem {
return &ArrayItem{ return &ArrayItem{
nil, nil,
nil, nil,

View File

@ -9,7 +9,7 @@ type Assign struct {
AssignOp AssignOp
} }
func NewAssign(Variable node.Node, Expression node.Node) node.Node { func NewAssign(Variable node.Node, Expression node.Node) *Assign {
return &Assign{ return &Assign{
AssignOp{ AssignOp{
nil, nil,

View File

@ -9,7 +9,7 @@ type AssignRef struct {
AssignOp AssignOp
} }
func NewAssignRef(Variable node.Node, Expression node.Node) node.Node { func NewAssignRef(Variable node.Node, Expression node.Node) *AssignRef {
return &AssignRef{ return &AssignRef{
AssignOp{ AssignOp{
nil, nil,

View File

@ -9,7 +9,7 @@ type BitwiseAnd struct {
AssignOp AssignOp
} }
func NewBitwiseAnd(Variable node.Node, Expression node.Node) node.Node { func NewBitwiseAnd(Variable node.Node, Expression node.Node) *BitwiseAnd {
return &BitwiseAnd{ return &BitwiseAnd{
AssignOp{ AssignOp{
nil, nil,

View File

@ -9,7 +9,7 @@ type BitwiseOr struct {
AssignOp AssignOp
} }
func NewBitwiseOr(Variable node.Node, Expression node.Node) node.Node { func NewBitwiseOr(Variable node.Node, Expression node.Node) *BitwiseOr {
return &BitwiseOr{ return &BitwiseOr{
AssignOp{ AssignOp{
nil, nil,

View File

@ -9,7 +9,7 @@ type BitwiseXor struct {
AssignOp AssignOp
} }
func NewBitwiseXor(Variable node.Node, Expression node.Node) node.Node { func NewBitwiseXor(Variable node.Node, Expression node.Node) *BitwiseXor {
return &BitwiseXor{ return &BitwiseXor{
AssignOp{ AssignOp{
nil, nil,

View File

@ -9,7 +9,7 @@ type Concat struct {
AssignOp AssignOp
} }
func NewConcat(Variable node.Node, Expression node.Node) node.Node { func NewConcat(Variable node.Node, Expression node.Node) *Concat {
return &Concat{ return &Concat{
AssignOp{ AssignOp{
nil, nil,

View File

@ -9,7 +9,7 @@ type Div struct {
AssignOp AssignOp
} }
func NewDiv(Variable node.Node, Expression node.Node) node.Node { func NewDiv(Variable node.Node, Expression node.Node) *Div {
return &Div{ return &Div{
AssignOp{ AssignOp{
nil, nil,

View File

@ -9,7 +9,7 @@ type Minus struct {
AssignOp AssignOp
} }
func NewMinus(Variable node.Node, Expression node.Node) node.Node { func NewMinus(Variable node.Node, Expression node.Node) *Minus {
return &Minus{ return &Minus{
AssignOp{ AssignOp{
nil, nil,

View File

@ -9,7 +9,7 @@ type Mod struct {
AssignOp AssignOp
} }
func NewMod(Variable node.Node, Expression node.Node) node.Node { func NewMod(Variable node.Node, Expression node.Node) *Mod {
return &Mod{ return &Mod{
AssignOp{ AssignOp{
nil, nil,

View File

@ -9,7 +9,7 @@ type Mul struct {
AssignOp AssignOp
} }
func NewMul(Variable node.Node, Expression node.Node) node.Node { func NewMul(Variable node.Node, Expression node.Node) *Mul {
return &Mul{ return &Mul{
AssignOp{ AssignOp{
nil, nil,

View File

@ -9,7 +9,7 @@ type Plus struct {
AssignOp AssignOp
} }
func NewPlus(Variable node.Node, Expression node.Node) node.Node { func NewPlus(Variable node.Node, Expression node.Node) *Plus {
return &Plus{ return &Plus{
AssignOp{ AssignOp{
nil, nil,

View File

@ -9,7 +9,7 @@ type Pow struct {
AssignOp AssignOp
} }
func NewPow(Variable node.Node, Expression node.Node) node.Node { func NewPow(Variable node.Node, Expression node.Node) *Pow {
return &Pow{ return &Pow{
AssignOp{ AssignOp{
nil, nil,

View File

@ -9,7 +9,7 @@ type ShiftLeft struct {
AssignOp AssignOp
} }
func NewShiftLeft(Variable node.Node, Expression node.Node) node.Node { func NewShiftLeft(Variable node.Node, Expression node.Node) *ShiftLeft {
return &ShiftLeft{ return &ShiftLeft{
AssignOp{ AssignOp{
nil, nil,

View File

@ -9,7 +9,7 @@ type ShiftRight struct {
AssignOp AssignOp
} }
func NewShiftRight(Variable node.Node, Expression node.Node) node.Node { func NewShiftRight(Variable node.Node, Expression node.Node) *ShiftRight {
return &ShiftRight{ return &ShiftRight{
AssignOp{ AssignOp{
nil, nil,

View File

@ -9,7 +9,7 @@ type BitwiseAnd struct {
BinaryOp BinaryOp
} }
func NewBitwiseAnd(Variable node.Node, Expression node.Node) node.Node { func NewBitwiseAnd(Variable node.Node, Expression node.Node) *BitwiseAnd {
return &BitwiseAnd{ return &BitwiseAnd{
BinaryOp{ BinaryOp{
nil, nil,

View File

@ -9,7 +9,7 @@ type BitwiseOr struct {
BinaryOp BinaryOp
} }
func NewBitwiseOr(Variable node.Node, Expression node.Node) node.Node { func NewBitwiseOr(Variable node.Node, Expression node.Node) *BitwiseOr {
return &BitwiseOr{ return &BitwiseOr{
BinaryOp{ BinaryOp{
nil, nil,

View File

@ -9,7 +9,7 @@ type BitwiseXor struct {
BinaryOp BinaryOp
} }
func NewBitwiseXor(Variable node.Node, Expression node.Node) node.Node { func NewBitwiseXor(Variable node.Node, Expression node.Node) *BitwiseXor {
return &BitwiseXor{ return &BitwiseXor{
BinaryOp{ BinaryOp{
nil, nil,

View File

@ -9,7 +9,7 @@ type BooleanAnd struct {
BinaryOp BinaryOp
} }
func NewBooleanAnd(Variable node.Node, Expression node.Node) node.Node { func NewBooleanAnd(Variable node.Node, Expression node.Node) *BooleanAnd {
return &BooleanAnd{ return &BooleanAnd{
BinaryOp{ BinaryOp{
nil, nil,

View File

@ -9,7 +9,7 @@ type BooleanOr struct {
BinaryOp BinaryOp
} }
func NewBooleanOr(Variable node.Node, Expression node.Node) node.Node { func NewBooleanOr(Variable node.Node, Expression node.Node) *BooleanOr {
return &BooleanOr{ return &BooleanOr{
BinaryOp{ BinaryOp{
nil, nil,

View File

@ -9,7 +9,7 @@ type Coalesce struct {
BinaryOp BinaryOp
} }
func NewCoalesce(Variable node.Node, Expression node.Node) node.Node { func NewCoalesce(Variable node.Node, Expression node.Node) *Coalesce {
return &Coalesce{ return &Coalesce{
BinaryOp{ BinaryOp{
nil, nil,

View File

@ -9,7 +9,7 @@ type Concat struct {
BinaryOp BinaryOp
} }
func NewConcat(Variable node.Node, Expression node.Node) node.Node { func NewConcat(Variable node.Node, Expression node.Node) *Concat {
return &Concat{ return &Concat{
BinaryOp{ BinaryOp{
nil, nil,

View File

@ -9,7 +9,7 @@ type Div struct {
BinaryOp BinaryOp
} }
func NewDiv(Variable node.Node, Expression node.Node) node.Node { func NewDiv(Variable node.Node, Expression node.Node) *Div {
return &Div{ return &Div{
BinaryOp{ BinaryOp{
nil, nil,

View File

@ -9,7 +9,7 @@ type Equal struct {
BinaryOp BinaryOp
} }
func NewEqual(Variable node.Node, Expression node.Node) node.Node { func NewEqual(Variable node.Node, Expression node.Node) *Equal {
return &Equal{ return &Equal{
BinaryOp{ BinaryOp{
nil, nil,

View File

@ -9,7 +9,7 @@ type Greater struct {
BinaryOp BinaryOp
} }
func NewGreater(Variable node.Node, Expression node.Node) node.Node { func NewGreater(Variable node.Node, Expression node.Node) *Greater {
return &Greater{ return &Greater{
BinaryOp{ BinaryOp{
nil, nil,

View File

@ -9,7 +9,7 @@ type GreaterOrEqual struct {
BinaryOp BinaryOp
} }
func NewGreaterOrEqual(Variable node.Node, Expression node.Node) node.Node { func NewGreaterOrEqual(Variable node.Node, Expression node.Node) *GreaterOrEqual {
return &GreaterOrEqual{ return &GreaterOrEqual{
BinaryOp{ BinaryOp{
nil, nil,

View File

@ -9,7 +9,7 @@ type Identical struct {
BinaryOp BinaryOp
} }
func NewIdentical(Variable node.Node, Expression node.Node) node.Node { func NewIdentical(Variable node.Node, Expression node.Node) *Identical {
return &Identical{ return &Identical{
BinaryOp{ BinaryOp{
nil, nil,

View File

@ -9,7 +9,7 @@ type LogicalAnd struct {
BinaryOp BinaryOp
} }
func NewLogicalAnd(Variable node.Node, Expression node.Node) node.Node { func NewLogicalAnd(Variable node.Node, Expression node.Node) *LogicalAnd {
return &LogicalAnd{ return &LogicalAnd{
BinaryOp{ BinaryOp{
nil, nil,

View File

@ -9,7 +9,7 @@ type LogicalOr struct {
BinaryOp BinaryOp
} }
func NewLogicalOr(Variable node.Node, Expression node.Node) node.Node { func NewLogicalOr(Variable node.Node, Expression node.Node) *LogicalOr {
return &LogicalOr{ return &LogicalOr{
BinaryOp{ BinaryOp{
nil, nil,

View File

@ -9,7 +9,7 @@ type LogicalXor struct {
BinaryOp BinaryOp
} }
func NewLogicalXor(Variable node.Node, Expression node.Node) node.Node { func NewLogicalXor(Variable node.Node, Expression node.Node) *LogicalXor {
return &LogicalXor{ return &LogicalXor{
BinaryOp{ BinaryOp{
nil, nil,

View File

@ -9,7 +9,7 @@ type Minus struct {
BinaryOp BinaryOp
} }
func NewMinus(Variable node.Node, Expression node.Node) node.Node { func NewMinus(Variable node.Node, Expression node.Node) *Minus {
return &Minus{ return &Minus{
BinaryOp{ BinaryOp{
nil, nil,

View File

@ -9,7 +9,7 @@ type Mod struct {
BinaryOp BinaryOp
} }
func NewMod(Variable node.Node, Expression node.Node) node.Node { func NewMod(Variable node.Node, Expression node.Node) *Mod {
return &Mod{ return &Mod{
BinaryOp{ BinaryOp{
nil, nil,

View File

@ -9,7 +9,7 @@ type Mul struct {
BinaryOp BinaryOp
} }
func NewMul(Variable node.Node, Expression node.Node) node.Node { func NewMul(Variable node.Node, Expression node.Node) *Mul {
return &Mul{ return &Mul{
BinaryOp{ BinaryOp{
nil, nil,

View File

@ -9,7 +9,7 @@ type NotEqual struct {
BinaryOp BinaryOp
} }
func NewNotEqual(Variable node.Node, Expression node.Node) node.Node { func NewNotEqual(Variable node.Node, Expression node.Node) *NotEqual {
return &NotEqual{ return &NotEqual{
BinaryOp{ BinaryOp{
nil, nil,

View File

@ -9,7 +9,7 @@ type NotIdentical struct {
BinaryOp BinaryOp
} }
func NewNotIdentical(Variable node.Node, Expression node.Node) node.Node { func NewNotIdentical(Variable node.Node, Expression node.Node) *NotIdentical {
return &NotIdentical{ return &NotIdentical{
BinaryOp{ BinaryOp{
nil, nil,

View File

@ -9,7 +9,7 @@ type Plus struct {
BinaryOp BinaryOp
} }
func NewPlus(Variable node.Node, Expression node.Node) node.Node { func NewPlus(Variable node.Node, Expression node.Node) *Plus {
return &Plus{ return &Plus{
BinaryOp{ BinaryOp{
nil, nil,

View File

@ -9,7 +9,7 @@ type Pow struct {
BinaryOp BinaryOp
} }
func NewPow(Variable node.Node, Expression node.Node) node.Node { func NewPow(Variable node.Node, Expression node.Node) *Pow {
return &Pow{ return &Pow{
BinaryOp{ BinaryOp{
nil, nil,

View File

@ -9,7 +9,7 @@ type ShiftLeft struct {
BinaryOp BinaryOp
} }
func NewShiftLeft(Variable node.Node, Expression node.Node) node.Node { func NewShiftLeft(Variable node.Node, Expression node.Node) *ShiftLeft {
return &ShiftLeft{ return &ShiftLeft{
BinaryOp{ BinaryOp{
nil, nil,

View File

@ -9,7 +9,7 @@ type ShiftRight struct {
BinaryOp BinaryOp
} }
func NewShiftRight(Variable node.Node, Expression node.Node) node.Node { func NewShiftRight(Variable node.Node, Expression node.Node) *ShiftRight {
return &ShiftRight{ return &ShiftRight{
BinaryOp{ BinaryOp{
nil, nil,

View File

@ -9,7 +9,7 @@ type Smaller struct {
BinaryOp BinaryOp
} }
func NewSmaller(Variable node.Node, Expression node.Node) node.Node { func NewSmaller(Variable node.Node, Expression node.Node) *Smaller {
return &Smaller{ return &Smaller{
BinaryOp{ BinaryOp{
nil, nil,

View File

@ -9,7 +9,7 @@ type SmallerOrEqual struct {
BinaryOp BinaryOp
} }
func NewSmallerOrEqual(Variable node.Node, Expression node.Node) node.Node { func NewSmallerOrEqual(Variable node.Node, Expression node.Node) *SmallerOrEqual {
return &SmallerOrEqual{ return &SmallerOrEqual{
BinaryOp{ BinaryOp{
nil, nil,

View File

@ -9,7 +9,7 @@ type Spaceship struct {
BinaryOp BinaryOp
} }
func NewSpaceship(Variable node.Node, Expression node.Node) node.Node { func NewSpaceship(Variable node.Node, Expression node.Node) *Spaceship {
return &Spaceship{ return &Spaceship{
BinaryOp{ BinaryOp{
nil, nil,

View File

@ -11,7 +11,7 @@ type BitwiseNot struct {
Expr node.Node Expr node.Node
} }
func NewBitwiseNot(Expression node.Node) node.Node { func NewBitwiseNot(Expression node.Node) *BitwiseNot {
return &BitwiseNot{ return &BitwiseNot{
nil, nil,
nil, nil,

View File

@ -11,7 +11,7 @@ type BooleanNot struct {
Expr node.Node Expr node.Node
} }
func NewBooleanNot(Expression node.Node) node.Node { func NewBooleanNot(Expression node.Node) *BooleanNot {
return &BooleanNot{ return &BooleanNot{
nil, nil,
nil, nil,

View File

@ -9,7 +9,7 @@ type CastArray struct {
Cast Cast
} }
func NewCastArray(Expr node.Node) node.Node { func NewCastArray(Expr node.Node) *CastArray {
return &CastArray{ return &CastArray{
Cast{ Cast{
nil, nil,

View File

@ -9,7 +9,7 @@ type CastBool struct {
Cast Cast
} }
func NewCastBool(Expr node.Node) node.Node { func NewCastBool(Expr node.Node) *CastBool {
return &CastBool{ return &CastBool{
Cast{ Cast{
nil, nil,

View File

@ -9,7 +9,7 @@ type CastDouble struct {
Cast Cast
} }
func NewCastDouble(Expr node.Node) node.Node { func NewCastDouble(Expr node.Node) *CastDouble {
return &CastDouble{ return &CastDouble{
Cast{ Cast{
nil, nil,

View File

@ -9,7 +9,7 @@ type CastInt struct {
Cast Cast
} }
func NewCastInt(Expr node.Node) node.Node { func NewCastInt(Expr node.Node) *CastInt {
return &CastInt{ return &CastInt{
Cast{ Cast{
nil, nil,

View File

@ -9,7 +9,7 @@ type CastObject struct {
Cast Cast
} }
func NewCastObject(Expr node.Node) node.Node { func NewCastObject(Expr node.Node) *CastObject {
return &CastObject{ return &CastObject{
Cast{ Cast{
nil, nil,

View File

@ -9,7 +9,7 @@ type CastString struct {
Cast Cast
} }
func NewCastString(Expr node.Node) node.Node { func NewCastString(Expr node.Node) *CastString {
return &CastString{ return &CastString{
Cast{ Cast{
nil, nil,

View File

@ -9,7 +9,7 @@ type CastUnset struct {
Cast Cast
} }
func NewCastUnset(Expr node.Node) node.Node { func NewCastUnset(Expr node.Node) *CastUnset {
return &CastUnset{ return &CastUnset{
Cast{ Cast{
nil, nil,

View File

@ -12,7 +12,7 @@ type ClassConstFetch struct {
ConstantName node.Node ConstantName node.Node
} }
func NewClassConstFetch(Class node.Node, ConstantName node.Node) node.Node { func NewClassConstFetch(Class node.Node, ConstantName node.Node) *ClassConstFetch {
return &ClassConstFetch{ return &ClassConstFetch{
nil, nil,
nil, nil,

View File

@ -11,7 +11,7 @@ type Clone struct {
Expr node.Node Expr node.Node
} }
func NewClone(Expression node.Node) node.Node { func NewClone(Expression node.Node) *Clone {
return &Clone{ return &Clone{
nil, nil,
nil, nil,

View File

@ -17,7 +17,7 @@ type Closure struct {
Stmts []node.Node Stmts []node.Node
} }
func NewClosure(Params []node.Node, Uses []node.Node, ReturnType node.Node, Stmts []node.Node, Static bool, ReturnsRef bool, PhpDocComment string) node.Node { func NewClosure(Params []node.Node, Uses []node.Node, ReturnType node.Node, Stmts []node.Node, Static bool, ReturnsRef bool, PhpDocComment string) *Closure {
return &Closure{ return &Closure{
nil, nil,
nil, nil,

View File

@ -12,7 +12,7 @@ type ClusureUse struct {
Variable node.Node Variable node.Node
} }
func NewClusureUse(Variable node.Node, ByRef bool) node.Node { func NewClusureUse(Variable node.Node, ByRef bool) *ClusureUse {
return &ClusureUse{ return &ClusureUse{
nil, nil,
nil, nil,

View File

@ -11,7 +11,7 @@ type ConstFetch struct {
Constant node.Node Constant node.Node
} }
func NewConstFetch(Constant node.Node) node.Node { func NewConstFetch(Constant node.Node) *ConstFetch {
return &ConstFetch{ return &ConstFetch{
nil, nil,
nil, nil,

View File

@ -11,7 +11,7 @@ type Empty struct {
Expr node.Node Expr node.Node
} }
func NewEmpty(Expression node.Node) node.Node { func NewEmpty(Expression node.Node) *Empty {
return &Empty{ return &Empty{
nil, nil,
nil, nil,

View File

@ -11,7 +11,7 @@ type ErrorSuppress struct {
Expr node.Node Expr node.Node
} }
func NewErrorSuppress(Expression node.Node) node.Node { func NewErrorSuppress(Expression node.Node) *ErrorSuppress {
return &ErrorSuppress{ return &ErrorSuppress{
nil, nil,
nil, nil,

View File

@ -11,7 +11,7 @@ type Eval struct {
Expr node.Node Expr node.Node
} }
func NewEval(Expression node.Node) node.Node { func NewEval(Expression node.Node) *Eval {
return &Eval{ return &Eval{
nil, nil,
nil, nil,

View File

@ -12,7 +12,7 @@ type Exit struct {
IsDie bool IsDie bool
} }
func NewExit(Expr node.Node, IsDie bool) node.Node { func NewExit(Expr node.Node, IsDie bool) *Exit {
return &Exit{ return &Exit{
nil, nil,
nil, nil,

View File

@ -12,7 +12,7 @@ type FunctionCall struct {
Arguments []node.Node Arguments []node.Node
} }
func NewFunctionCall(Function node.Node, Arguments []node.Node) node.Node { func NewFunctionCall(Function node.Node, Arguments []node.Node) *FunctionCall {
return &FunctionCall{ return &FunctionCall{
nil, nil,
nil, nil,

View File

@ -11,7 +11,7 @@ type Include struct {
Expr node.Node Expr node.Node
} }
func NewInclude(Expression node.Node) node.Node { func NewInclude(Expression node.Node) *Include {
return &Include{ return &Include{
nil, nil,
nil, nil,

View File

@ -11,7 +11,7 @@ type IncludeOnce struct {
Expr node.Node Expr node.Node
} }
func NewIncludeOnce(Expression node.Node) node.Node { func NewIncludeOnce(Expression node.Node) *IncludeOnce {
return &IncludeOnce{ return &IncludeOnce{
nil, nil,
nil, nil,

View File

@ -12,7 +12,7 @@ type InstanceOf struct {
Class node.Node Class node.Node
} }
func NewInstanceOf(Expr node.Node, Class node.Node) node.Node { func NewInstanceOf(Expr node.Node, Class node.Node) *InstanceOf {
return &InstanceOf{ return &InstanceOf{
nil, nil,
nil, nil,

View File

@ -11,7 +11,7 @@ type Isset struct {
Variables []node.Node Variables []node.Node
} }
func NewIsset(Variables []node.Node) node.Node { func NewIsset(Variables []node.Node) *Isset {
return &Isset{ return &Isset{
nil, nil,
nil, nil,

View File

@ -11,7 +11,7 @@ type List struct {
Items []node.Node Items []node.Node
} }
func NewList(Items []node.Node) node.Node { func NewList(Items []node.Node) *List {
return &List{ return &List{
nil, nil,
nil, nil,

View File

@ -13,7 +13,7 @@ type MethodCall struct {
Arguments []node.Node Arguments []node.Node
} }
func NewMethodCall(Variable node.Node, Method node.Node, Arguments []node.Node) node.Node { func NewMethodCall(Variable node.Node, Method node.Node, Arguments []node.Node) *MethodCall {
return &MethodCall{ return &MethodCall{
nil, nil,
nil, nil,

View File

@ -12,7 +12,7 @@ type New struct {
Arguments []node.Node Arguments []node.Node
} }
func NewNew(Class node.Node, Arguments []node.Node) node.Node { func NewNew(Class node.Node, Arguments []node.Node) *New {
return &New{ return &New{
nil, nil,
nil, nil,

View File

@ -11,7 +11,7 @@ type PostDec struct {
Variable node.Node Variable node.Node
} }
func NewPostDec(Variable node.Node) node.Node { func NewPostDec(Variable node.Node) *PostDec {
return &PostDec{ return &PostDec{
nil, nil,
nil, nil,

View File

@ -11,7 +11,7 @@ type PostInc struct {
Variable node.Node Variable node.Node
} }
func NewPostInc(Variable node.Node) node.Node { func NewPostInc(Variable node.Node) *PostInc {
return &PostInc{ return &PostInc{
nil, nil,
nil, nil,

View File

@ -11,7 +11,7 @@ type PreDec struct {
Variable node.Node Variable node.Node
} }
func NewPreDec(Variable node.Node) node.Node { func NewPreDec(Variable node.Node) *PreDec {
return &PreDec{ return &PreDec{
nil, nil,
nil, nil,

View File

@ -11,7 +11,7 @@ type PreInc struct {
Variable node.Node Variable node.Node
} }
func NewPreInc(Variable node.Node) node.Node { func NewPreInc(Variable node.Node) *PreInc {
return &PreInc{ return &PreInc{
nil, nil,
nil, nil,

View File

@ -11,7 +11,7 @@ type Print struct {
Expr node.Node Expr node.Node
} }
func NewPrint(Expression node.Node) node.Node { func NewPrint(Expression node.Node) *Print {
return &Print{ return &Print{
nil, nil,
nil, nil,

View File

@ -12,7 +12,7 @@ type PropertyFetch struct {
Property node.Node Property node.Node
} }
func NewPropertyFetch(Variable node.Node, Property node.Node) node.Node { func NewPropertyFetch(Variable node.Node, Property node.Node) *PropertyFetch {
return &PropertyFetch{ return &PropertyFetch{
nil, nil,
nil, nil,

View File

@ -11,7 +11,7 @@ type Require struct {
Expr node.Node Expr node.Node
} }
func NewRequire(Expression node.Node) node.Node { func NewRequire(Expression node.Node) *Require {
return &Require{ return &Require{
nil, nil,
nil, nil,

View File

@ -11,7 +11,7 @@ type RequireOnce struct {
Expr node.Node Expr node.Node
} }
func NewRequireOnce(Expression node.Node) node.Node { func NewRequireOnce(Expression node.Node) *RequireOnce {
return &RequireOnce{ return &RequireOnce{
nil, nil,
nil, nil,

View File

@ -11,7 +11,7 @@ type ShellExec struct {
Parts []node.Node Parts []node.Node
} }
func NewShellExec(Parts []node.Node) node.Node { func NewShellExec(Parts []node.Node) *ShellExec {
return &ShellExec{ return &ShellExec{
nil, nil,
nil, nil,

View File

@ -11,7 +11,7 @@ type ShortArray struct {
Items []node.Node Items []node.Node
} }
func NewShortArray(Items []node.Node) node.Node { func NewShortArray(Items []node.Node) *ShortArray {
return &ShortArray{ return &ShortArray{
nil, nil,
nil, nil,

View File

@ -11,7 +11,7 @@ type ShortList struct {
Items []node.Node Items []node.Node
} }
func NewShortList(Items []node.Node) node.Node { func NewShortList(Items []node.Node) *ShortList {
return &ShortList{ return &ShortList{
nil, nil,
nil, nil,

View File

@ -13,7 +13,7 @@ type StaticCall struct {
Arguments []node.Node Arguments []node.Node
} }
func NewStaticCall(Class node.Node, Call node.Node, Arguments []node.Node) node.Node { func NewStaticCall(Class node.Node, Call node.Node, Arguments []node.Node) *StaticCall {
return &StaticCall{ return &StaticCall{
nil, nil,
nil, nil,

View File

@ -12,7 +12,7 @@ type StaticPropertyFetch struct {
Property node.Node Property node.Node
} }
func NewStaticPropertyFetch(Class node.Node, Property node.Node) node.Node { func NewStaticPropertyFetch(Class node.Node, Property node.Node) *StaticPropertyFetch {
return &StaticPropertyFetch{ return &StaticPropertyFetch{
nil, nil,
nil, nil,

View File

@ -13,7 +13,7 @@ type Ternary struct {
IfFalse node.Node IfFalse node.Node
} }
func NewTernary(Condition node.Node, IfTrue node.Node, IfFalse node.Node) node.Node { func NewTernary(Condition node.Node, IfTrue node.Node, IfFalse node.Node) *Ternary {
return &Ternary{ return &Ternary{
nil, nil,
nil, nil,

View File

@ -11,7 +11,7 @@ type UnaryMinus struct {
Expr node.Node Expr node.Node
} }
func NewUnaryMinus(Expression node.Node) node.Node { func NewUnaryMinus(Expression node.Node) *UnaryMinus {
return &UnaryMinus{ return &UnaryMinus{
nil, nil,
nil, nil,

View File

@ -11,7 +11,7 @@ type UnaryPlus struct {
Expr node.Node Expr node.Node
} }
func NewUnaryPlus(Expression node.Node) node.Node { func NewUnaryPlus(Expression node.Node) *UnaryPlus {
return &UnaryPlus{ return &UnaryPlus{
nil, nil,
nil, nil,

View File

@ -11,7 +11,7 @@ type Variable struct {
VarName node.Node VarName node.Node
} }
func NewVariable(VarName node.Node) node.Node { func NewVariable(VarName node.Node) *Variable {
return &Variable{ return &Variable{
nil, nil,
nil, nil,

View File

@ -12,7 +12,7 @@ type Yield struct {
Value node.Node Value node.Node
} }
func NewYield(Key node.Node, Value node.Node) node.Node { func NewYield(Key node.Node, Value node.Node) *Yield {
return &Yield{ return &Yield{
nil, nil,
nil, nil,

View File

@ -11,7 +11,7 @@ type YieldFrom struct {
Expr node.Node Expr node.Node
} }
func NewYieldFrom(Expression node.Node) node.Node { func NewYieldFrom(Expression node.Node) *YieldFrom {
return &YieldFrom{ return &YieldFrom{
nil, nil,
nil, nil,

View File

@ -8,7 +8,7 @@ type Identifier struct {
Value string Value string
} }
func NewIdentifier(Value string) Node { func NewIdentifier(Value string) *Identifier {
return &Identifier{ return &Identifier{
nil, nil,
nil, nil,

View File

@ -8,7 +8,7 @@ type FullyQualified struct {
Name Name
} }
func NewFullyQualified(Parts []node.Node) node.Node { func NewFullyQualified(Parts []node.Node) *FullyQualified {
return &FullyQualified{ return &FullyQualified{
Name{ Name{
nil, nil,

View File

@ -11,7 +11,7 @@ type Name struct {
Parts []node.Node Parts []node.Node
} }
func NewName(Parts []node.Node) node.Node { func NewName(Parts []node.Node) *Name {
return &Name{ return &Name{
nil, nil,
nil, nil,

View File

@ -11,7 +11,7 @@ type NamePart struct {
Value string Value string
} }
func NewNamePart(Value string) node.Node { func NewNamePart(Value string) *NamePart {
return &NamePart{ return &NamePart{
nil, nil,
nil, nil,

View File

@ -8,7 +8,7 @@ type Relative struct {
Name Name
} }
func NewRelative(Parts []node.Node) node.Node { func NewRelative(Parts []node.Node) *Relative {
return &Relative{ return &Relative{
Name{ Name{
nil, nil,

View File

@ -8,7 +8,7 @@ type Nullable struct {
Expr Node Expr Node
} }
func NewNullable(Expression Node) Node { func NewNullable(Expression Node) *Nullable {
return &Nullable{ return &Nullable{
nil, nil,
nil, nil,

View File

@ -12,7 +12,7 @@ type Parameter struct {
DefaultValue Node DefaultValue Node
} }
func NewParameter(VariableType Node, Variable Node, DefaultValue Node, ByRef bool, Variadic bool) Node { func NewParameter(VariableType Node, Variable Node, DefaultValue Node, ByRef bool, Variadic bool) *Parameter {
return &Parameter{ return &Parameter{
nil, nil,
nil, nil,

View File

@ -11,7 +11,7 @@ type Dnumber struct {
Value string Value string
} }
func NewDnumber(Value string) node.Node { func NewDnumber(Value string) *Dnumber {
return &Dnumber{ return &Dnumber{
nil, nil,
nil, nil,

View File

@ -11,7 +11,7 @@ type Encapsed struct {
Parts []node.Node Parts []node.Node
} }
func NewEncapsed(Parts []node.Node) node.Node { func NewEncapsed(Parts []node.Node) *Encapsed {
return &Encapsed{ return &Encapsed{
nil, nil,
nil, nil,

View File

@ -11,7 +11,7 @@ type EncapsedStringPart struct {
Value string Value string
} }
func NewEncapsedStringPart(Value string) node.Node { func NewEncapsedStringPart(Value string) *EncapsedStringPart {
return &EncapsedStringPart{ return &EncapsedStringPart{
nil, nil,
nil, nil,

Some files were not shown because too many files have changed in this diff Show More