constructors return pointer

This commit is contained in:
z7zmey
2018-01-04 20:42:44 +02:00
parent 383a245370
commit dc8808a7d6
154 changed files with 154 additions and 154 deletions

View File

@@ -11,7 +11,7 @@ type AltElse struct {
}
func NewAltElse(stmt node.Node) node.Node {
return AltElse{
return &AltElse{
map[string]interface{}{},
nil,
stmt,

View File

@@ -12,7 +12,7 @@ type AltElseIf struct {
}
func NewAltElseIf(cond node.Node, stmt node.Node) node.Node {
return AltElseIf{
return &AltElseIf{
map[string]interface{}{},
nil,
cond,

View File

@@ -14,7 +14,7 @@ type AltIf struct {
}
func NewAltIf(cond node.Node, stmt node.Node) node.Node {
return AltIf{
return &AltIf{
map[string]interface{}{},
nil,
cond,

View File

@@ -11,7 +11,7 @@ type Break struct {
}
func NewBreak(expr node.Node) node.Node {
return Break{
return &Break{
map[string]interface{}{},
nil,
expr,

View File

@@ -12,7 +12,7 @@ type Case struct {
}
func NewCase(cond node.Node, stmts []node.Node) node.Node {
return Case{
return &Case{
map[string]interface{}{},
nil,
cond,

View File

@@ -13,7 +13,7 @@ type Catch struct {
}
func NewCatch(types []node.Node, variable node.Node, stmts []node.Node) node.Node {
return Catch{
return &Catch{
map[string]interface{}{},
nil,
types,

View File

@@ -16,7 +16,7 @@ type Class struct {
}
func NewClass(className node.Node, modifiers []node.Node, args []node.Node, extends node.Node, implements []node.Node, stmts []node.Node, phpDocComment string) node.Node {
return Class{
return &Class{
map[string]interface{}{
"phpDocComment": phpDocComment,
},

View File

@@ -12,7 +12,7 @@ type ClassConstList struct {
}
func NewClassConstList(modifiers []node.Node, consts []node.Node) node.Node {
return ClassConstList{
return &ClassConstList{
map[string]interface{}{},
nil,
modifiers,

View File

@@ -15,7 +15,7 @@ type ClassMethod struct {
}
func NewClassMethod(methodName node.Node, modifiers []node.Node, returnsRef bool, params []node.Node, returnType node.Node, stmts []node.Node, phpDocComment string) node.Node {
return ClassMethod{
return &ClassMethod{
map[string]interface{}{
"returnsRef": returnsRef,
"phpDocComment": phpDocComment,

View File

@@ -11,7 +11,7 @@ type ConstList struct {
}
func NewConstList(consts []node.Node) node.Node {
return ConstList{
return &ConstList{
map[string]interface{}{},
nil,
consts,

View File

@@ -12,7 +12,7 @@ type Constant struct {
}
func NewConstant(constantName node.Node, expr node.Node, phpDocComment string) node.Node {
return Constant{
return &Constant{
map[string]interface{}{
"phpDocComment": phpDocComment,
},

View File

@@ -11,7 +11,7 @@ type Continue struct {
}
func NewContinue(expr node.Node) node.Node {
return Continue{
return &Continue{
map[string]interface{}{},
nil,
expr,

View File

@@ -12,7 +12,7 @@ type Declare struct {
}
func NewDeclare(consts []node.Node, stmt node.Node) node.Node {
return Declare{
return &Declare{
map[string]interface{}{},
nil,
consts,

View File

@@ -11,7 +11,7 @@ type Default struct {
}
func NewDefault(stmts []node.Node) node.Node {
return Default{
return &Default{
map[string]interface{}{},
nil,
stmts,

View File

@@ -12,7 +12,7 @@ type Do struct {
}
func NewDo(stmt node.Node, cond node.Node) node.Node {
return Do{
return &Do{
map[string]interface{}{},
nil,
stmt,

View File

@@ -11,7 +11,7 @@ type Echo struct {
}
func NewEcho(exprs []node.Node) node.Node {
return Echo{
return &Echo{
map[string]interface{}{},
nil,
exprs,

View File

@@ -11,7 +11,7 @@ type Else struct {
}
func NewElse(stmt node.Node) node.Node {
return Else{
return &Else{
map[string]interface{}{},
nil,
stmt,

View File

@@ -12,7 +12,7 @@ type ElseIf struct {
}
func NewElseIf(cond node.Node, stmt node.Node) node.Node {
return ElseIf{
return &ElseIf{
map[string]interface{}{},
nil,
cond,

View File

@@ -11,7 +11,7 @@ type Expression struct {
}
func NewExpression(expr node.Node) node.Node {
return Expression{
return &Expression{
map[string]interface{}{},
nil,
expr,

View File

@@ -11,7 +11,7 @@ type Finally struct {
}
func NewFinally(stmts []node.Node) node.Node {
return Finally{
return &Finally{
map[string]interface{}{},
nil,
stmts,

View File

@@ -14,7 +14,7 @@ type For struct {
}
func NewFor(init []node.Node, cond []node.Node, loop []node.Node, stmt node.Node) node.Node {
return For{
return &For{
map[string]interface{}{},
nil,
init,

View File

@@ -14,7 +14,7 @@ type Foreach struct {
}
func NewForeach(expr node.Node, key node.Node, variable node.Node, stmt node.Node, byRef bool) node.Node {
return Foreach{
return &Foreach{
map[string]interface{}{
"byRef": byRef,
},

View File

@@ -14,7 +14,7 @@ type Function struct {
}
func NewFunction(functionName node.Node, returnsRef bool, params []node.Node, returnType node.Node, stmts []node.Node, phpDocComment string) node.Node {
return Function{
return &Function{
map[string]interface{}{
"returnsRef": returnsRef,
"phpDocComment": phpDocComment,

View File

@@ -11,7 +11,7 @@ type Global struct {
}
func NewGlobal(vars []node.Node) node.Node {
return Global{
return &Global{
map[string]interface{}{},
nil,
vars,

View File

@@ -11,7 +11,7 @@ type Goto struct {
}
func NewGoto(label node.Node) node.Node {
return Goto{
return &Goto{
map[string]interface{}{},
nil,
label,

View File

@@ -13,7 +13,7 @@ type GroupUse struct {
}
func NewGroupUse(useType node.Node, prefix node.Node, useList []node.Node) node.Node {
return GroupUse{
return &GroupUse{
map[string]interface{}{},
nil,
useType,

View File

@@ -10,7 +10,7 @@ type HaltCompiler struct {
}
func NewHaltCompiler() node.Node {
return HaltCompiler{
return &HaltCompiler{
map[string]interface{}{},
nil,
}

View File

@@ -14,7 +14,7 @@ type If struct {
}
func NewIf(cond node.Node, stmt node.Node) node.Node {
return If{
return &If{
map[string]interface{}{},
nil,
cond,

View File

@@ -10,7 +10,7 @@ type InlineHtml struct {
}
func NewInlineHtml(value string) node.Node {
return InlineHtml{
return &InlineHtml{
map[string]interface{}{
"value": value,
},

View File

@@ -13,7 +13,7 @@ type Interface struct {
}
func NewInterface(interfaceName node.Node, extends []node.Node, stmts []node.Node, phpDocComment string) node.Node {
return Interface{
return &Interface{
map[string]interface{}{
"phpDocComment": phpDocComment,
},

View File

@@ -11,7 +11,7 @@ type Label struct {
}
func NewLabel(labelName node.Node) node.Node {
return Label{
return &Label{
map[string]interface{}{},
nil,
labelName,

View File

@@ -12,7 +12,7 @@ type Namespace struct {
}
func NewNamespace(namespaceName node.Node, stmts []node.Node) node.Node {
return Namespace{
return &Namespace{
map[string]interface{}{},
nil,
namespaceName,

View File

@@ -10,7 +10,7 @@ type Nop struct {
}
func NewNop() node.Node {
return Nop{
return &Nop{
map[string]interface{}{},
nil,
}

View File

@@ -12,7 +12,7 @@ type Property struct {
}
func NewProperty(variable node.Node, expr node.Node, phpDocComment string) node.Node {
return Property{
return &Property{
map[string]interface{}{
"phpDocComment": phpDocComment,
},

View File

@@ -12,7 +12,7 @@ type PropertyList struct {
}
func NewPropertyList(modifiers []node.Node, properties []node.Node) node.Node {
return PropertyList{
return &PropertyList{
map[string]interface{}{},
nil,
modifiers,

View File

@@ -11,7 +11,7 @@ type Return struct {
}
func NewReturn(expr node.Node) node.Node {
return Return{
return &Return{
map[string]interface{}{},
nil,
expr,

View File

@@ -11,7 +11,7 @@ type Static struct {
}
func NewStatic(vars []node.Node) node.Node {
return Static{
return &Static{
map[string]interface{}{},
nil,
vars,

View File

@@ -12,7 +12,7 @@ type StaticVar struct {
}
func NewStaticVar(variable node.Node, expr node.Node) node.Node {
return StaticVar{
return &StaticVar{
map[string]interface{}{},
nil,
variable,

View File

@@ -11,7 +11,7 @@ type StmtList struct {
}
func NewStmtList(stmts []node.Node) node.Node {
return StmtList{
return &StmtList{
map[string]interface{}{},
nil,
stmts,

View File

@@ -14,7 +14,7 @@ type Switch struct {
}
func NewSwitch(token token.Token, cond node.Node, cases []node.Node) node.Node {
return Switch{
return &Switch{
map[string]interface{}{},
nil,
token,

View File

@@ -11,7 +11,7 @@ type Throw struct {
}
func NewThrow(expr node.Node) node.Node {
return Throw{
return &Throw{
map[string]interface{}{},
nil,
expr,

View File

@@ -12,7 +12,7 @@ type Trait struct {
}
func NewTrait(traitName node.Node, stmts []node.Node, phpDocComment string) node.Node {
return Trait{
return &Trait{
map[string]interface{}{
"phpDocComment": phpDocComment,
},

View File

@@ -12,7 +12,7 @@ type TraitMethodRef struct {
}
func NewTraitMethodRef(trait node.Node, method node.Node) node.Node {
return TraitMethodRef{
return &TraitMethodRef{
map[string]interface{}{},
nil,
trait,

View File

@@ -12,7 +12,7 @@ type TraitUse struct {
}
func NewTraitUse(traits []node.Node, adaptations []node.Node) node.Node {
return TraitUse{
return &TraitUse{
map[string]interface{}{},
nil,
traits,

View File

@@ -13,7 +13,7 @@ type TraitUseAlias struct {
}
func NewTraitUseAlias(ref node.Node, modifier node.Node, alias node.Node) node.Node {
return TraitUseAlias{
return &TraitUseAlias{
map[string]interface{}{},
nil,
ref,

View File

@@ -12,7 +12,7 @@ type TraitUsePrecedence struct {
}
func NewTraitUsePrecedence(ref node.Node, insteadof node.Node) node.Node {
return TraitUsePrecedence{
return &TraitUsePrecedence{
map[string]interface{}{},
nil,
ref,

View File

@@ -13,7 +13,7 @@ type Try struct {
}
func NewTry(stmts []node.Node, catches []node.Node, finally node.Node) node.Node {
return Try{
return &Try{
map[string]interface{}{},
nil,
stmts,

View File

@@ -11,7 +11,7 @@ type Unset struct {
}
func NewUnset(vars []node.Node) node.Node {
return Unset{
return &Unset{
map[string]interface{}{},
nil,
vars,

View File

@@ -13,7 +13,7 @@ type Use struct {
}
func NewUse(useType node.Node, use node.Node, alias node.Node) node.Node {
return Use{
return &Use{
map[string]interface{}{},
nil,
useType,

View File

@@ -12,7 +12,7 @@ type UseList struct {
}
func NewUseList(useType node.Node, uses []node.Node) node.Node {
return UseList{
return &UseList{
map[string]interface{}{},
nil,
useType,

View File

@@ -14,7 +14,7 @@ type While struct {
}
func NewWhile(token token.Token, cond node.Node, stmt node.Node) node.Node {
return While{
return &While{
map[string]interface{}{},
nil,
token,