php5 syntax
This commit is contained in:
@@ -4,14 +4,16 @@ import "github.com/z7zmey/php-parser/walker"
|
||||
|
||||
// Argument node
|
||||
type Argument struct {
|
||||
Variadic bool // if ... before variable
|
||||
Expr Node // Exression
|
||||
Variadic bool // if ... before variable
|
||||
IsReference bool // if & before variable
|
||||
Expr Node // Exression
|
||||
}
|
||||
|
||||
// NewArgument node constuctor
|
||||
func NewArgument(Expression Node, Variadic bool) *Argument {
|
||||
func NewArgument(Expression Node, Variadic bool, IsReference bool) *Argument {
|
||||
return &Argument{
|
||||
Variadic,
|
||||
IsReference,
|
||||
Expression,
|
||||
}
|
||||
}
|
||||
@@ -19,7 +21,8 @@ func NewArgument(Expression Node, Variadic bool) *Argument {
|
||||
// Attributes returns node attributes as map
|
||||
func (n *Argument) Attributes() map[string]interface{} {
|
||||
return map[string]interface{}{
|
||||
"Variadic": n.Variadic,
|
||||
"Variadic": n.Variadic,
|
||||
"IsReference": n.IsReference,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user