extract positions package
This commit is contained in:
@@ -5,13 +5,11 @@ import (
|
||||
)
|
||||
|
||||
type AltElse struct {
|
||||
position *node.Position
|
||||
Stmt node.Node
|
||||
Stmt node.Node
|
||||
}
|
||||
|
||||
func NewAltElse(Stmt node.Node) *AltElse {
|
||||
return &AltElse{
|
||||
nil,
|
||||
Stmt,
|
||||
}
|
||||
}
|
||||
@@ -20,15 +18,6 @@ func (n *AltElse) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *AltElse) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *AltElse) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *AltElse) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -5,14 +5,12 @@ import (
|
||||
)
|
||||
|
||||
type AltElseIf struct {
|
||||
position *node.Position
|
||||
Cond node.Node
|
||||
Stmt node.Node
|
||||
Cond node.Node
|
||||
Stmt node.Node
|
||||
}
|
||||
|
||||
func NewAltElseIf(Cond node.Node, Stmt node.Node) *AltElseIf {
|
||||
return &AltElseIf{
|
||||
nil,
|
||||
Cond,
|
||||
Stmt,
|
||||
}
|
||||
@@ -22,15 +20,6 @@ func (n *AltElseIf) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *AltElseIf) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *AltElseIf) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *AltElseIf) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -5,16 +5,14 @@ import (
|
||||
)
|
||||
|
||||
type AltIf struct {
|
||||
position *node.Position
|
||||
Cond node.Node
|
||||
Stmt node.Node
|
||||
ElseIf []node.Node
|
||||
_else node.Node
|
||||
Cond node.Node
|
||||
Stmt node.Node
|
||||
ElseIf []node.Node
|
||||
_else node.Node
|
||||
}
|
||||
|
||||
func NewAltIf(Cond node.Node, Stmt node.Node) *AltIf {
|
||||
return &AltIf{
|
||||
nil,
|
||||
Cond,
|
||||
Stmt,
|
||||
nil,
|
||||
@@ -26,15 +24,6 @@ func (n *AltIf) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *AltIf) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *AltIf) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *AltIf) AddElseIf(ElseIf node.Node) node.Node {
|
||||
if n.ElseIf == nil {
|
||||
n.ElseIf = make([]node.Node, 0)
|
||||
|
||||
@@ -5,13 +5,11 @@ import (
|
||||
)
|
||||
|
||||
type Break struct {
|
||||
position *node.Position
|
||||
Expr node.Node
|
||||
Expr node.Node
|
||||
}
|
||||
|
||||
func NewBreak(Expr node.Node) *Break {
|
||||
return &Break{
|
||||
nil,
|
||||
Expr,
|
||||
}
|
||||
}
|
||||
@@ -20,15 +18,6 @@ func (n *Break) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *Break) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *Break) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Break) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -5,14 +5,12 @@ import (
|
||||
)
|
||||
|
||||
type Case struct {
|
||||
position *node.Position
|
||||
Cond node.Node
|
||||
Stmts []node.Node
|
||||
Cond node.Node
|
||||
Stmts []node.Node
|
||||
}
|
||||
|
||||
func NewCase(Cond node.Node, Stmts []node.Node) *Case {
|
||||
return &Case{
|
||||
nil,
|
||||
Cond,
|
||||
Stmts,
|
||||
}
|
||||
@@ -22,15 +20,6 @@ func (n *Case) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *Case) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *Case) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Case) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -5,7 +5,6 @@ import (
|
||||
)
|
||||
|
||||
type Catch struct {
|
||||
position *node.Position
|
||||
Types []node.Node
|
||||
Variable node.Node
|
||||
Stmts []node.Node
|
||||
@@ -13,7 +12,6 @@ type Catch struct {
|
||||
|
||||
func NewCatch(Types []node.Node, Variable node.Node, Stmts []node.Node) *Catch {
|
||||
return &Catch{
|
||||
nil,
|
||||
Types,
|
||||
Variable,
|
||||
Stmts,
|
||||
@@ -24,15 +22,6 @@ func (n *Catch) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *Catch) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *Catch) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Catch) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -5,7 +5,6 @@ import (
|
||||
)
|
||||
|
||||
type Class struct {
|
||||
position *node.Position
|
||||
PhpDocComment string
|
||||
ClassName node.Node
|
||||
Modifiers []node.Node
|
||||
@@ -17,7 +16,6 @@ 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) *Class {
|
||||
return &Class{
|
||||
nil,
|
||||
PhpDocComment,
|
||||
ClassName,
|
||||
Modifiers,
|
||||
@@ -34,15 +32,6 @@ func (n *Class) Attributes() map[string]interface{} {
|
||||
}
|
||||
}
|
||||
|
||||
func (n *Class) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *Class) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Class) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -5,14 +5,12 @@ import (
|
||||
)
|
||||
|
||||
type ClassConstList struct {
|
||||
position *node.Position
|
||||
Modifiers []node.Node
|
||||
Consts []node.Node
|
||||
}
|
||||
|
||||
func NewClassConstList(Modifiers []node.Node, Consts []node.Node) *ClassConstList {
|
||||
return &ClassConstList{
|
||||
nil,
|
||||
Modifiers,
|
||||
Consts,
|
||||
}
|
||||
@@ -22,15 +20,6 @@ func (n *ClassConstList) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *ClassConstList) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *ClassConstList) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *ClassConstList) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -5,7 +5,6 @@ import (
|
||||
)
|
||||
|
||||
type ClassMethod struct {
|
||||
position *node.Position
|
||||
ReturnsRef bool
|
||||
PhpDocComment string
|
||||
MethodName node.Node
|
||||
@@ -17,7 +16,6 @@ type ClassMethod struct {
|
||||
|
||||
func NewClassMethod(MethodName node.Node, Modifiers []node.Node, ReturnsRef bool, Params []node.Node, ReturnType node.Node, Stmts []node.Node, PhpDocComment string) *ClassMethod {
|
||||
return &ClassMethod{
|
||||
nil,
|
||||
ReturnsRef,
|
||||
PhpDocComment,
|
||||
MethodName,
|
||||
@@ -35,15 +33,6 @@ func (n *ClassMethod) Attributes() map[string]interface{} {
|
||||
}
|
||||
}
|
||||
|
||||
func (n *ClassMethod) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *ClassMethod) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *ClassMethod) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -5,13 +5,11 @@ import (
|
||||
)
|
||||
|
||||
type ConstList struct {
|
||||
position *node.Position
|
||||
Consts []node.Node
|
||||
Consts []node.Node
|
||||
}
|
||||
|
||||
func NewConstList(Consts []node.Node) *ConstList {
|
||||
return &ConstList{
|
||||
nil,
|
||||
Consts,
|
||||
}
|
||||
}
|
||||
@@ -20,15 +18,6 @@ func (n *ConstList) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *ConstList) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *ConstList) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *ConstList) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -5,7 +5,6 @@ import (
|
||||
)
|
||||
|
||||
type Constant struct {
|
||||
position *node.Position
|
||||
PhpDocComment string
|
||||
ConstantName node.Node
|
||||
Expr node.Node
|
||||
@@ -13,7 +12,6 @@ type Constant struct {
|
||||
|
||||
func NewConstant(ConstantName node.Node, Expr node.Node, PhpDocComment string) *Constant {
|
||||
return &Constant{
|
||||
nil,
|
||||
PhpDocComment,
|
||||
ConstantName,
|
||||
Expr,
|
||||
@@ -26,15 +24,6 @@ func (n *Constant) Attributes() map[string]interface{} {
|
||||
}
|
||||
}
|
||||
|
||||
func (n *Constant) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *Constant) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Constant) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -5,13 +5,11 @@ import (
|
||||
)
|
||||
|
||||
type Continue struct {
|
||||
position *node.Position
|
||||
Expr node.Node
|
||||
Expr node.Node
|
||||
}
|
||||
|
||||
func NewContinue(Expr node.Node) *Continue {
|
||||
return &Continue{
|
||||
nil,
|
||||
Expr,
|
||||
}
|
||||
}
|
||||
@@ -20,15 +18,6 @@ func (n *Continue) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *Continue) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *Continue) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Continue) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -5,14 +5,12 @@ import (
|
||||
)
|
||||
|
||||
type Declare struct {
|
||||
position *node.Position
|
||||
Consts []node.Node
|
||||
Stmt node.Node
|
||||
Consts []node.Node
|
||||
Stmt node.Node
|
||||
}
|
||||
|
||||
func NewDeclare(Consts []node.Node, Stmt node.Node) *Declare {
|
||||
return &Declare{
|
||||
nil,
|
||||
Consts,
|
||||
Stmt,
|
||||
}
|
||||
@@ -22,15 +20,6 @@ func (n *Declare) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *Declare) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *Declare) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Declare) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -5,13 +5,11 @@ import (
|
||||
)
|
||||
|
||||
type Default struct {
|
||||
position *node.Position
|
||||
Stmts []node.Node
|
||||
Stmts []node.Node
|
||||
}
|
||||
|
||||
func NewDefault(Stmts []node.Node) *Default {
|
||||
return &Default{
|
||||
nil,
|
||||
Stmts,
|
||||
}
|
||||
}
|
||||
@@ -20,15 +18,6 @@ func (n *Default) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *Default) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *Default) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Default) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -5,14 +5,12 @@ import (
|
||||
)
|
||||
|
||||
type Do struct {
|
||||
position *node.Position
|
||||
Stmt node.Node
|
||||
Cond node.Node
|
||||
Stmt node.Node
|
||||
Cond node.Node
|
||||
}
|
||||
|
||||
func NewDo(Stmt node.Node, Cond node.Node) *Do {
|
||||
return &Do{
|
||||
nil,
|
||||
Stmt,
|
||||
Cond,
|
||||
}
|
||||
@@ -22,15 +20,6 @@ func (n *Do) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *Do) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *Do) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Do) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -5,13 +5,11 @@ import (
|
||||
)
|
||||
|
||||
type Echo struct {
|
||||
position *node.Position
|
||||
Exprs []node.Node
|
||||
Exprs []node.Node
|
||||
}
|
||||
|
||||
func NewEcho(Exprs []node.Node) *Echo {
|
||||
return &Echo{
|
||||
nil,
|
||||
Exprs,
|
||||
}
|
||||
}
|
||||
@@ -20,15 +18,6 @@ func (n *Echo) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *Echo) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *Echo) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Echo) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -5,13 +5,11 @@ import (
|
||||
)
|
||||
|
||||
type Else struct {
|
||||
position *node.Position
|
||||
Stmt node.Node
|
||||
Stmt node.Node
|
||||
}
|
||||
|
||||
func NewElse(Stmt node.Node) *Else {
|
||||
return &Else{
|
||||
nil,
|
||||
Stmt,
|
||||
}
|
||||
}
|
||||
@@ -20,15 +18,6 @@ func (n *Else) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *Else) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *Else) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Else) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -5,14 +5,12 @@ import (
|
||||
)
|
||||
|
||||
type ElseIf struct {
|
||||
position *node.Position
|
||||
Cond node.Node
|
||||
Stmt node.Node
|
||||
Cond node.Node
|
||||
Stmt node.Node
|
||||
}
|
||||
|
||||
func NewElseIf(Cond node.Node, Stmt node.Node) *ElseIf {
|
||||
return &ElseIf{
|
||||
nil,
|
||||
Cond,
|
||||
Stmt,
|
||||
}
|
||||
@@ -22,15 +20,6 @@ func (n *ElseIf) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *ElseIf) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *ElseIf) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *ElseIf) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -5,13 +5,11 @@ import (
|
||||
)
|
||||
|
||||
type Expression struct {
|
||||
position *node.Position
|
||||
Expr node.Node
|
||||
Expr node.Node
|
||||
}
|
||||
|
||||
func NewExpression(Expr node.Node) *Expression {
|
||||
return &Expression{
|
||||
nil,
|
||||
Expr,
|
||||
}
|
||||
}
|
||||
@@ -20,15 +18,6 @@ func (n *Expression) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *Expression) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *Expression) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Expression) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -5,13 +5,11 @@ import (
|
||||
)
|
||||
|
||||
type Finally struct {
|
||||
position *node.Position
|
||||
Stmts []node.Node
|
||||
Stmts []node.Node
|
||||
}
|
||||
|
||||
func NewFinally(Stmts []node.Node) *Finally {
|
||||
return &Finally{
|
||||
nil,
|
||||
Stmts,
|
||||
}
|
||||
}
|
||||
@@ -20,15 +18,6 @@ func (n *Finally) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *Finally) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *Finally) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Finally) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -5,16 +5,14 @@ import (
|
||||
)
|
||||
|
||||
type For struct {
|
||||
position *node.Position
|
||||
Init []node.Node
|
||||
Cond []node.Node
|
||||
Loop []node.Node
|
||||
Stmt node.Node
|
||||
Init []node.Node
|
||||
Cond []node.Node
|
||||
Loop []node.Node
|
||||
Stmt node.Node
|
||||
}
|
||||
|
||||
func NewFor(Init []node.Node, Cond []node.Node, Loop []node.Node, Stmt node.Node) *For {
|
||||
return &For{
|
||||
nil,
|
||||
Init,
|
||||
Cond,
|
||||
Loop,
|
||||
@@ -26,15 +24,6 @@ func (n *For) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *For) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *For) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *For) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -5,7 +5,6 @@ import (
|
||||
)
|
||||
|
||||
type Foreach struct {
|
||||
position *node.Position
|
||||
ByRef bool
|
||||
Expr node.Node
|
||||
Key node.Node
|
||||
@@ -15,7 +14,6 @@ type Foreach struct {
|
||||
|
||||
func NewForeach(Expr node.Node, Key node.Node, Variable node.Node, Stmt node.Node, ByRef bool) *Foreach {
|
||||
return &Foreach{
|
||||
nil,
|
||||
ByRef,
|
||||
Expr,
|
||||
Key,
|
||||
@@ -30,15 +28,6 @@ func (n *Foreach) Attributes() map[string]interface{} {
|
||||
}
|
||||
}
|
||||
|
||||
func (n *Foreach) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *Foreach) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Foreach) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -5,7 +5,6 @@ import (
|
||||
)
|
||||
|
||||
type Function struct {
|
||||
position *node.Position
|
||||
ReturnsRef bool
|
||||
PhpDocComment string
|
||||
FunctionName node.Node
|
||||
@@ -16,7 +15,6 @@ type Function struct {
|
||||
|
||||
func NewFunction(FunctionName node.Node, ReturnsRef bool, Params []node.Node, ReturnType node.Node, Stmts []node.Node, PhpDocComment string) *Function {
|
||||
return &Function{
|
||||
nil,
|
||||
ReturnsRef,
|
||||
PhpDocComment,
|
||||
FunctionName,
|
||||
@@ -34,15 +32,6 @@ func (n *Function) Attributes() map[string]interface{} {
|
||||
}
|
||||
}
|
||||
|
||||
func (n *Function) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *Function) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Function) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -5,13 +5,11 @@ import (
|
||||
)
|
||||
|
||||
type Global struct {
|
||||
position *node.Position
|
||||
Vars []node.Node
|
||||
Vars []node.Node
|
||||
}
|
||||
|
||||
func NewGlobal(Vars []node.Node) *Global {
|
||||
return &Global{
|
||||
nil,
|
||||
Vars,
|
||||
}
|
||||
}
|
||||
@@ -20,15 +18,6 @@ func (n *Global) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *Global) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *Global) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Global) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -5,13 +5,11 @@ import (
|
||||
)
|
||||
|
||||
type Goto struct {
|
||||
position *node.Position
|
||||
Label node.Node
|
||||
Label node.Node
|
||||
}
|
||||
|
||||
func NewGoto(Label node.Node) *Goto {
|
||||
return &Goto{
|
||||
nil,
|
||||
Label,
|
||||
}
|
||||
}
|
||||
@@ -20,15 +18,6 @@ func (n *Goto) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *Goto) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *Goto) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Goto) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -5,15 +5,13 @@ import (
|
||||
)
|
||||
|
||||
type GroupUse struct {
|
||||
position *node.Position
|
||||
UseType node.Node
|
||||
pRefix node.Node
|
||||
UseList []node.Node
|
||||
UseType node.Node
|
||||
pRefix node.Node
|
||||
UseList []node.Node
|
||||
}
|
||||
|
||||
func NewGroupUse(UseType node.Node, pRefix node.Node, UseList []node.Node) *GroupUse {
|
||||
return &GroupUse{
|
||||
nil,
|
||||
UseType,
|
||||
pRefix,
|
||||
UseList,
|
||||
@@ -24,15 +22,6 @@ func (n *GroupUse) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *GroupUse) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *GroupUse) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *GroupUse) SetUseType(UseType node.Node) node.Node {
|
||||
n.UseType = UseType
|
||||
return n
|
||||
|
||||
@@ -5,28 +5,16 @@ import (
|
||||
)
|
||||
|
||||
type HaltCompiler struct {
|
||||
position *node.Position
|
||||
}
|
||||
|
||||
func NewHaltCompiler() *HaltCompiler {
|
||||
return &HaltCompiler{
|
||||
nil,
|
||||
}
|
||||
return &HaltCompiler{}
|
||||
}
|
||||
|
||||
func (n *HaltCompiler) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *HaltCompiler) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *HaltCompiler) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *HaltCompiler) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -5,16 +5,14 @@ import (
|
||||
)
|
||||
|
||||
type If struct {
|
||||
position *node.Position
|
||||
Cond node.Node
|
||||
Stmt node.Node
|
||||
ElseIf []node.Node
|
||||
_else node.Node
|
||||
Cond node.Node
|
||||
Stmt node.Node
|
||||
ElseIf []node.Node
|
||||
_else node.Node
|
||||
}
|
||||
|
||||
func NewIf(Cond node.Node, Stmt node.Node) *If {
|
||||
return &If{
|
||||
nil,
|
||||
Cond,
|
||||
Stmt,
|
||||
nil,
|
||||
@@ -26,15 +24,6 @@ func (n *If) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *If) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *If) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *If) AddElseIf(ElseIf node.Node) node.Node {
|
||||
if n.ElseIf == nil {
|
||||
n.ElseIf = make([]node.Node, 0)
|
||||
|
||||
@@ -5,13 +5,11 @@ import (
|
||||
)
|
||||
|
||||
type InlineHtml struct {
|
||||
position *node.Position
|
||||
Value string
|
||||
Value string
|
||||
}
|
||||
|
||||
func NewInlineHtml(Value string) *InlineHtml {
|
||||
return &InlineHtml{
|
||||
nil,
|
||||
Value,
|
||||
}
|
||||
}
|
||||
@@ -22,15 +20,6 @@ func (n *InlineHtml) Attributes() map[string]interface{} {
|
||||
}
|
||||
}
|
||||
|
||||
func (n *InlineHtml) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *InlineHtml) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *InlineHtml) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -5,7 +5,6 @@ import (
|
||||
)
|
||||
|
||||
type Interface struct {
|
||||
position *node.Position
|
||||
PhpDocComment string
|
||||
InterfaceName node.Node
|
||||
Extends []node.Node
|
||||
@@ -14,7 +13,6 @@ type Interface struct {
|
||||
|
||||
func NewInterface(InterfaceName node.Node, Extends []node.Node, Stmts []node.Node, PhpDocComment string) *Interface {
|
||||
return &Interface{
|
||||
nil,
|
||||
PhpDocComment,
|
||||
InterfaceName,
|
||||
Extends,
|
||||
@@ -28,15 +26,6 @@ func (n *Interface) Attributes() map[string]interface{} {
|
||||
}
|
||||
}
|
||||
|
||||
func (n *Interface) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *Interface) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Interface) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -5,13 +5,11 @@ import (
|
||||
)
|
||||
|
||||
type Label struct {
|
||||
position *node.Position
|
||||
LabelName node.Node
|
||||
}
|
||||
|
||||
func NewLabel(LabelName node.Node) *Label {
|
||||
return &Label{
|
||||
nil,
|
||||
LabelName,
|
||||
}
|
||||
}
|
||||
@@ -20,15 +18,6 @@ func (n *Label) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *Label) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *Label) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Label) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -5,14 +5,12 @@ import (
|
||||
)
|
||||
|
||||
type Namespace struct {
|
||||
position *node.Position
|
||||
NamespaceName node.Node
|
||||
Stmts []node.Node
|
||||
}
|
||||
|
||||
func NewNamespace(NamespaceName node.Node, Stmts []node.Node) *Namespace {
|
||||
return &Namespace{
|
||||
nil,
|
||||
NamespaceName,
|
||||
Stmts,
|
||||
}
|
||||
@@ -22,15 +20,6 @@ func (n *Namespace) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *Namespace) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *Namespace) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Namespace) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -5,28 +5,16 @@ import (
|
||||
)
|
||||
|
||||
type Nop struct {
|
||||
position *node.Position
|
||||
}
|
||||
|
||||
func NewNop() *Nop {
|
||||
return &Nop{
|
||||
nil,
|
||||
}
|
||||
return &Nop{}
|
||||
}
|
||||
|
||||
func (n *Nop) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *Nop) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *Nop) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Nop) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -5,7 +5,6 @@ import (
|
||||
)
|
||||
|
||||
type Property struct {
|
||||
position *node.Position
|
||||
PhpDocComment string
|
||||
Variable node.Node
|
||||
Expr node.Node
|
||||
@@ -13,7 +12,6 @@ type Property struct {
|
||||
|
||||
func NewProperty(Variable node.Node, Expr node.Node, PhpDocComment string) *Property {
|
||||
return &Property{
|
||||
nil,
|
||||
PhpDocComment,
|
||||
Variable,
|
||||
Expr,
|
||||
@@ -25,15 +23,6 @@ func (n *Property) Attributes() map[string]interface{} {
|
||||
}
|
||||
}
|
||||
|
||||
func (n *Property) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *Property) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Property) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -5,14 +5,12 @@ import (
|
||||
)
|
||||
|
||||
type PropertyList struct {
|
||||
position *node.Position
|
||||
Modifiers []node.Node
|
||||
Properties []node.Node
|
||||
}
|
||||
|
||||
func NewPropertyList(Modifiers []node.Node, Properties []node.Node) *PropertyList {
|
||||
return &PropertyList{
|
||||
nil,
|
||||
Modifiers,
|
||||
Properties,
|
||||
}
|
||||
@@ -22,15 +20,6 @@ func (n *PropertyList) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *PropertyList) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *PropertyList) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *PropertyList) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -5,13 +5,11 @@ import (
|
||||
)
|
||||
|
||||
type Return struct {
|
||||
position *node.Position
|
||||
Expr node.Node
|
||||
Expr node.Node
|
||||
}
|
||||
|
||||
func NewReturn(Expr node.Node) *Return {
|
||||
return &Return{
|
||||
nil,
|
||||
Expr,
|
||||
}
|
||||
}
|
||||
@@ -20,15 +18,6 @@ func (n *Return) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *Return) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *Return) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Return) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -5,13 +5,11 @@ import (
|
||||
)
|
||||
|
||||
type Static struct {
|
||||
position *node.Position
|
||||
Vars []node.Node
|
||||
Vars []node.Node
|
||||
}
|
||||
|
||||
func NewStatic(Vars []node.Node) *Static {
|
||||
return &Static{
|
||||
nil,
|
||||
Vars,
|
||||
}
|
||||
}
|
||||
@@ -20,15 +18,6 @@ func (n *Static) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *Static) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *Static) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Static) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -5,14 +5,12 @@ import (
|
||||
)
|
||||
|
||||
type StaticVar struct {
|
||||
position *node.Position
|
||||
Variable node.Node
|
||||
Expr node.Node
|
||||
}
|
||||
|
||||
func NewStaticVar(Variable node.Node, Expr node.Node) *StaticVar {
|
||||
return &StaticVar{
|
||||
nil,
|
||||
Variable,
|
||||
Expr,
|
||||
}
|
||||
@@ -22,15 +20,6 @@ func (n *StaticVar) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *StaticVar) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *StaticVar) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *StaticVar) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -5,13 +5,11 @@ import (
|
||||
)
|
||||
|
||||
type StmtList struct {
|
||||
position *node.Position
|
||||
Stmts []node.Node
|
||||
Stmts []node.Node
|
||||
}
|
||||
|
||||
func NewStmtList(Stmts []node.Node) *StmtList {
|
||||
return &StmtList{
|
||||
nil,
|
||||
Stmts,
|
||||
}
|
||||
}
|
||||
@@ -20,15 +18,6 @@ func (n *StmtList) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *StmtList) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *StmtList) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *StmtList) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -6,15 +6,13 @@ import (
|
||||
)
|
||||
|
||||
type Switch struct {
|
||||
position *node.Position
|
||||
token token.Token
|
||||
Cond node.Node
|
||||
cases []node.Node
|
||||
token token.Token
|
||||
Cond node.Node
|
||||
cases []node.Node
|
||||
}
|
||||
|
||||
func NewSwitch(token token.Token, Cond node.Node, cases []node.Node) *Switch {
|
||||
return &Switch{
|
||||
nil,
|
||||
token,
|
||||
Cond,
|
||||
cases,
|
||||
@@ -25,15 +23,6 @@ func (n *Switch) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *Switch) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *Switch) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Switch) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -5,13 +5,11 @@ import (
|
||||
)
|
||||
|
||||
type Throw struct {
|
||||
position *node.Position
|
||||
Expr node.Node
|
||||
Expr node.Node
|
||||
}
|
||||
|
||||
func NewThrow(Expr node.Node) *Throw {
|
||||
return &Throw{
|
||||
nil,
|
||||
Expr,
|
||||
}
|
||||
}
|
||||
@@ -20,15 +18,6 @@ func (n *Throw) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *Throw) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *Throw) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Throw) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -5,7 +5,6 @@ import (
|
||||
)
|
||||
|
||||
type Trait struct {
|
||||
position *node.Position
|
||||
PhpDocComment string
|
||||
TraitName node.Node
|
||||
Stmts []node.Node
|
||||
@@ -13,7 +12,6 @@ type Trait struct {
|
||||
|
||||
func NewTrait(TraitName node.Node, Stmts []node.Node, PhpDocComment string) *Trait {
|
||||
return &Trait{
|
||||
nil,
|
||||
PhpDocComment,
|
||||
TraitName,
|
||||
Stmts,
|
||||
@@ -26,15 +24,6 @@ func (n *Trait) Attributes() map[string]interface{} {
|
||||
}
|
||||
}
|
||||
|
||||
func (n *Trait) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *Trait) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Trait) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -5,14 +5,12 @@ import (
|
||||
)
|
||||
|
||||
type TraitMethodRef struct {
|
||||
position *node.Position
|
||||
Trait node.Node
|
||||
Method node.Node
|
||||
Trait node.Node
|
||||
Method node.Node
|
||||
}
|
||||
|
||||
func NewTraitMethodRef(Trait node.Node, Method node.Node) *TraitMethodRef {
|
||||
return &TraitMethodRef{
|
||||
nil,
|
||||
Trait,
|
||||
Method,
|
||||
}
|
||||
@@ -22,15 +20,6 @@ func (n *TraitMethodRef) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *TraitMethodRef) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *TraitMethodRef) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *TraitMethodRef) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -5,14 +5,12 @@ import (
|
||||
)
|
||||
|
||||
type TraitUse struct {
|
||||
position *node.Position
|
||||
Traits []node.Node
|
||||
Adaptations []node.Node
|
||||
}
|
||||
|
||||
func NewTraitUse(Traits []node.Node, Adaptations []node.Node) *TraitUse {
|
||||
return &TraitUse{
|
||||
nil,
|
||||
Traits,
|
||||
Adaptations,
|
||||
}
|
||||
@@ -22,15 +20,6 @@ func (n *TraitUse) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *TraitUse) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *TraitUse) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *TraitUse) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -5,7 +5,6 @@ import (
|
||||
)
|
||||
|
||||
type TraitUseAlias struct {
|
||||
position *node.Position
|
||||
Ref node.Node
|
||||
Modifier node.Node
|
||||
Alias node.Node
|
||||
@@ -13,7 +12,6 @@ type TraitUseAlias struct {
|
||||
|
||||
func NewTraitUseAlias(Ref node.Node, Modifier node.Node, Alias node.Node) *TraitUseAlias {
|
||||
return &TraitUseAlias{
|
||||
nil,
|
||||
Ref,
|
||||
Modifier,
|
||||
Alias,
|
||||
@@ -24,15 +22,6 @@ func (n *TraitUseAlias) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *TraitUseAlias) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *TraitUseAlias) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *TraitUseAlias) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -5,14 +5,12 @@ import (
|
||||
)
|
||||
|
||||
type TraitUsePrecedence struct {
|
||||
position *node.Position
|
||||
Ref node.Node
|
||||
Insteadof node.Node
|
||||
}
|
||||
|
||||
func NewTraitUsePrecedence(Ref node.Node, Insteadof node.Node) *TraitUsePrecedence {
|
||||
return &TraitUsePrecedence{
|
||||
nil,
|
||||
Ref,
|
||||
Insteadof,
|
||||
}
|
||||
@@ -22,15 +20,6 @@ func (n *TraitUsePrecedence) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *TraitUsePrecedence) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *TraitUsePrecedence) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *TraitUsePrecedence) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -5,15 +5,13 @@ import (
|
||||
)
|
||||
|
||||
type Try struct {
|
||||
position *node.Position
|
||||
Stmts []node.Node
|
||||
Catches []node.Node
|
||||
Finally node.Node
|
||||
Stmts []node.Node
|
||||
Catches []node.Node
|
||||
Finally node.Node
|
||||
}
|
||||
|
||||
func NewTry(Stmts []node.Node, Catches []node.Node, Finally node.Node) *Try {
|
||||
return &Try{
|
||||
nil,
|
||||
Stmts,
|
||||
Catches,
|
||||
Finally,
|
||||
@@ -24,15 +22,6 @@ func (n *Try) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *Try) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *Try) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Try) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -5,13 +5,11 @@ import (
|
||||
)
|
||||
|
||||
type Unset struct {
|
||||
position *node.Position
|
||||
Vars []node.Node
|
||||
Vars []node.Node
|
||||
}
|
||||
|
||||
func NewUnset(Vars []node.Node) *Unset {
|
||||
return &Unset{
|
||||
nil,
|
||||
Vars,
|
||||
}
|
||||
}
|
||||
@@ -20,15 +18,6 @@ func (n *Unset) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *Unset) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *Unset) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Unset) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -5,15 +5,13 @@ import (
|
||||
)
|
||||
|
||||
type Use struct {
|
||||
position *node.Position
|
||||
UseType node.Node
|
||||
Use node.Node
|
||||
Alias node.Node
|
||||
UseType node.Node
|
||||
Use node.Node
|
||||
Alias node.Node
|
||||
}
|
||||
|
||||
func NewUse(UseType node.Node, use node.Node, Alias node.Node) *Use {
|
||||
return &Use{
|
||||
nil,
|
||||
UseType,
|
||||
use,
|
||||
Alias,
|
||||
@@ -24,15 +22,6 @@ func (n *Use) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *Use) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *Use) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *Use) SetUseType(UseType node.Node) node.Node {
|
||||
n.UseType = UseType
|
||||
return n
|
||||
|
||||
@@ -5,14 +5,12 @@ import (
|
||||
)
|
||||
|
||||
type UseList struct {
|
||||
position *node.Position
|
||||
UseType node.Node
|
||||
Uses []node.Node
|
||||
UseType node.Node
|
||||
Uses []node.Node
|
||||
}
|
||||
|
||||
func NewUseList(UseType node.Node, Uses []node.Node) *UseList {
|
||||
return &UseList{
|
||||
nil,
|
||||
UseType,
|
||||
Uses,
|
||||
}
|
||||
@@ -22,15 +20,6 @@ func (n *UseList) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *UseList) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *UseList) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *UseList) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
@@ -6,15 +6,13 @@ import (
|
||||
)
|
||||
|
||||
type While struct {
|
||||
position *node.Position
|
||||
Token token.Token
|
||||
Cond node.Node
|
||||
Stmt node.Node
|
||||
Token token.Token
|
||||
Cond node.Node
|
||||
Stmt node.Node
|
||||
}
|
||||
|
||||
func NewWhile(Token token.Token, Cond node.Node, Stmt node.Node) *While {
|
||||
return &While{
|
||||
nil,
|
||||
Token,
|
||||
Cond,
|
||||
Stmt,
|
||||
@@ -25,15 +23,6 @@ func (n *While) Attributes() map[string]interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *While) Position() *node.Position {
|
||||
return n.position
|
||||
}
|
||||
|
||||
func (n *While) SetPosition(p *node.Position) node.Node {
|
||||
n.position = p
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *While) Walk(v node.Visitor) {
|
||||
if v.EnterNode(n) == false {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user