[refactoring] update ast structure of "MagicConstant" and "String" nodes

This commit is contained in:
Vadym Slizov
2020-11-20 23:53:58 +02:00
parent e6a23dfa3a
commit 3bda40e8ce
5 changed files with 1374 additions and 1349 deletions

View File

@@ -172,7 +172,8 @@ func (n *ScalarLnumber) Accept(v NodeVisitor) {
// ScalarMagicConstant node
type ScalarMagicConstant struct {
Node
Value []byte
MagicConstTkn *token.Token
Value []byte
}
func (n *ScalarMagicConstant) Accept(v NodeVisitor) {
@@ -182,7 +183,9 @@ func (n *ScalarMagicConstant) Accept(v NodeVisitor) {
// ScalarString node
type ScalarString struct {
Node
Value []byte
MinusTkn *token.Token
StringTkn *token.Token
Value []byte
}
func (n *ScalarString) Accept(v NodeVisitor) {