node constructors return concrete type
This commit is contained in:
@@ -11,7 +11,7 @@ type Dnumber struct {
|
||||
Value string
|
||||
}
|
||||
|
||||
func NewDnumber(Value string) node.Node {
|
||||
func NewDnumber(Value string) *Dnumber {
|
||||
return &Dnumber{
|
||||
nil,
|
||||
nil,
|
||||
|
||||
@@ -11,7 +11,7 @@ type Encapsed struct {
|
||||
Parts []node.Node
|
||||
}
|
||||
|
||||
func NewEncapsed(Parts []node.Node) node.Node {
|
||||
func NewEncapsed(Parts []node.Node) *Encapsed {
|
||||
return &Encapsed{
|
||||
nil,
|
||||
nil,
|
||||
|
||||
@@ -11,7 +11,7 @@ type EncapsedStringPart struct {
|
||||
Value string
|
||||
}
|
||||
|
||||
func NewEncapsedStringPart(Value string) node.Node {
|
||||
func NewEncapsedStringPart(Value string) *EncapsedStringPart {
|
||||
return &EncapsedStringPart{
|
||||
nil,
|
||||
nil,
|
||||
|
||||
@@ -11,7 +11,7 @@ type Lnumber struct {
|
||||
Value string
|
||||
}
|
||||
|
||||
func NewLnumber(Value string) node.Node {
|
||||
func NewLnumber(Value string) *Lnumber {
|
||||
return &Lnumber{
|
||||
nil,
|
||||
nil,
|
||||
|
||||
@@ -11,7 +11,7 @@ type MagicConstant struct {
|
||||
Value string
|
||||
}
|
||||
|
||||
func NewMagicConstant(Value string) node.Node {
|
||||
func NewMagicConstant(Value string) *MagicConstant {
|
||||
return &MagicConstant{
|
||||
nil,
|
||||
nil,
|
||||
|
||||
@@ -11,7 +11,7 @@ type String struct {
|
||||
Value string
|
||||
}
|
||||
|
||||
func NewString(Value string) node.Node {
|
||||
func NewString(Value string) *String {
|
||||
return &String{
|
||||
nil,
|
||||
nil,
|
||||
|
||||
Reference in New Issue
Block a user