remove meta.UseToken
This commit is contained in:
parent
c7d595df5c
commit
58f706fa0d
@ -41,7 +41,6 @@ const (
|
||||
CatchToken
|
||||
FinallyToken
|
||||
ThrowToken
|
||||
UseToken
|
||||
InsteadofToken
|
||||
GlobalToken
|
||||
VarToken
|
||||
|
@ -4,9 +4,9 @@ package meta
|
||||
|
||||
import "strconv"
|
||||
|
||||
const _TokenName_name = "NodeStartNodeEndIncludeTokenIncludeOnceTokenExitTokenIfTokenStringVarnameTokenNumStringTokenInlineHTMLTokenEchoTokenDoTokenWhileTokenEndwhileTokenForInitSemicolonTokenForCondSemicolonTokenForTokenEndforTokenForeachTokenEndforeachTokenDeclareTokenEnddeclareTokenAsTokenSwitchTokenEndswitchTokenCaseTokenDefaultTokenBreakTokenContinueTokenGotoTokenFunctionTokenConstTokenReturnTokenTryTokenCatchTokenFinallyTokenThrowTokenUseTokenInsteadofTokenGlobalTokenVarTokenUnsetTokenIssetTokenEmptyTokenClassTokenTraitTokenInterfaceTokenExtendsTokenImplementsTokenDoubleArrowTokenListTokenCallableTokenCurlyOpenTokenPaamayimNekudotayimTokenUseLeadingNsSeparatorTokenNsSeparatorTokenEllipsisTokenEvalTokenRequireTokenRequireOnceTokenLogicalOrTokenLogicalXorTokenLogicalAndTokenInstanceofTokenNewAnchorElseifTokenElseTokenEndifTokenPrintTokenYieldTokenStaticTokenAbstractTokenFinalTokenPrivateTokenProtectedTokenPublicTokenIncTokenDecTokenYieldFromTokenObjectOperatorTokenCoalesceTokenSpaceshipTokenPlusEqualTokenMinusEqualTokenMulEqualTokenPowEqualTokenDivEqualTokenConcatEqualTokenModEqualTokenAndEqualTokenOrEqualTokenXorEqualTokenSlEqualTokenSrEqualTokenBooleanOrTokenBooleanAndTokenPowTokenSlTokenSrTokenIsIdenticalTokenIsNotIdenticalTokenIsEqualTokenIsNotEqualTokenIsSmallerOrEqualTokenIsGreaterOrEqualTokenHaltCompilerTokenCaseSeparatorTokenBackquoteTokenOpenCurlyBracesTokenCloseCurlyBracesTokenSemiColonTokenColonTokenOpenParenthesisTokenCloseParenthesisTokenOpenSquareBracketCloseSquareBracketQuestionMarkTokenAmpersandTokenMinusTokenPlusTokenAtTokenCommaTokenVerticalBarTokenEqualTokenCaretTokenAsteriskTokenSlashTokenPercentTokenLessTokenGreaterTokenDotToken"
|
||||
const _TokenName_name = "NodeStartNodeEndIncludeTokenIncludeOnceTokenExitTokenIfTokenStringVarnameTokenNumStringTokenInlineHTMLTokenEchoTokenDoTokenWhileTokenEndwhileTokenForInitSemicolonTokenForCondSemicolonTokenForTokenEndforTokenForeachTokenEndforeachTokenDeclareTokenEnddeclareTokenAsTokenSwitchTokenEndswitchTokenCaseTokenDefaultTokenBreakTokenContinueTokenGotoTokenFunctionTokenConstTokenReturnTokenTryTokenCatchTokenFinallyTokenThrowTokenInsteadofTokenGlobalTokenVarTokenUnsetTokenIssetTokenEmptyTokenClassTokenTraitTokenInterfaceTokenExtendsTokenImplementsTokenDoubleArrowTokenListTokenCallableTokenCurlyOpenTokenPaamayimNekudotayimTokenUseLeadingNsSeparatorTokenNsSeparatorTokenEllipsisTokenEvalTokenRequireTokenRequireOnceTokenLogicalOrTokenLogicalXorTokenLogicalAndTokenInstanceofTokenNewAnchorElseifTokenElseTokenEndifTokenPrintTokenYieldTokenStaticTokenAbstractTokenFinalTokenPrivateTokenProtectedTokenPublicTokenIncTokenDecTokenYieldFromTokenObjectOperatorTokenCoalesceTokenSpaceshipTokenPlusEqualTokenMinusEqualTokenMulEqualTokenPowEqualTokenDivEqualTokenConcatEqualTokenModEqualTokenAndEqualTokenOrEqualTokenXorEqualTokenSlEqualTokenSrEqualTokenBooleanOrTokenBooleanAndTokenPowTokenSlTokenSrTokenIsIdenticalTokenIsNotIdenticalTokenIsEqualTokenIsNotEqualTokenIsSmallerOrEqualTokenIsGreaterOrEqualTokenHaltCompilerTokenCaseSeparatorTokenBackquoteTokenOpenCurlyBracesTokenCloseCurlyBracesTokenSemiColonTokenColonTokenOpenParenthesisTokenCloseParenthesisTokenOpenSquareBracketCloseSquareBracketQuestionMarkTokenAmpersandTokenMinusTokenPlusTokenAtTokenCommaTokenVerticalBarTokenEqualTokenCaretTokenAsteriskTokenSlashTokenPercentTokenLessTokenGreaterTokenDotToken"
|
||||
|
||||
var _TokenName_index = [...]uint16{0, 9, 16, 28, 44, 53, 60, 78, 92, 107, 116, 123, 133, 146, 167, 188, 196, 207, 219, 234, 246, 261, 268, 279, 293, 302, 314, 324, 337, 346, 359, 369, 380, 388, 398, 410, 420, 428, 442, 453, 461, 471, 481, 491, 501, 511, 525, 537, 552, 568, 577, 590, 604, 628, 654, 670, 683, 692, 704, 720, 734, 749, 764, 779, 788, 799, 808, 818, 828, 838, 849, 862, 872, 884, 898, 909, 917, 925, 939, 958, 971, 985, 999, 1014, 1027, 1040, 1053, 1069, 1082, 1095, 1107, 1120, 1132, 1144, 1158, 1173, 1181, 1188, 1195, 1211, 1230, 1242, 1257, 1278, 1299, 1316, 1334, 1348, 1368, 1389, 1403, 1413, 1433, 1454, 1471, 1489, 1506, 1520, 1530, 1539, 1546, 1556, 1572, 1582, 1592, 1605, 1615, 1627, 1636, 1648, 1656}
|
||||
var _TokenName_index = [...]uint16{0, 9, 16, 28, 44, 53, 60, 78, 92, 107, 116, 123, 133, 146, 167, 188, 196, 207, 219, 234, 246, 261, 268, 279, 293, 302, 314, 324, 337, 346, 359, 369, 380, 388, 398, 410, 420, 434, 445, 453, 463, 473, 483, 493, 503, 517, 529, 544, 560, 569, 582, 596, 620, 646, 662, 675, 684, 696, 712, 726, 741, 756, 771, 780, 791, 800, 810, 820, 830, 841, 854, 864, 876, 890, 901, 909, 917, 931, 950, 963, 977, 991, 1006, 1019, 1032, 1045, 1061, 1074, 1087, 1099, 1112, 1124, 1136, 1150, 1165, 1173, 1180, 1187, 1203, 1222, 1234, 1249, 1270, 1291, 1308, 1326, 1340, 1360, 1381, 1395, 1405, 1425, 1446, 1463, 1481, 1498, 1512, 1522, 1531, 1538, 1548, 1564, 1574, 1584, 1597, 1607, 1619, 1628, 1640, 1648}
|
||||
|
||||
func (i TokenName) String() string {
|
||||
if i < 0 || i >= TokenName(len(_TokenName_index)-1) {
|
||||
|
10
php5/php5.go
10
php5/php5.go
@ -2502,7 +2502,7 @@ yydefault:
|
||||
yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token))
|
||||
|
||||
// save comments
|
||||
yyDollar[1].token.Meta.SetTokenName(meta.UseToken).AppendTo(yyVAL.node.GetMeta())
|
||||
yyDollar[1].token.Meta.SetTokenName(meta.NodeStart).AppendTo(yyVAL.node.GetMeta())
|
||||
yyDollar[3].token.Meta.SetTokenName(meta.SemiColonToken).AppendTo(yyVAL.node.GetMeta())
|
||||
yylex.(*Parser).appendMetaToken(yyVAL.node, yyDollar[3].token, meta.SemiColonToken)
|
||||
|
||||
@ -2520,7 +2520,7 @@ yydefault:
|
||||
yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token))
|
||||
|
||||
// save comments
|
||||
yyDollar[1].token.Meta.SetTokenName(meta.UseToken).AppendTo(yyVAL.node.GetMeta())
|
||||
yyDollar[1].token.Meta.SetTokenName(meta.NodeStart).AppendTo(yyVAL.node.GetMeta())
|
||||
yyDollar[2].token.Meta.SetTokenName(meta.NodeStart).AppendTo(useType.GetMeta())
|
||||
yyDollar[4].token.Meta.SetTokenName(meta.SemiColonToken).AppendTo(yyVAL.node.GetMeta())
|
||||
yylex.(*Parser).appendMetaToken(yyVAL.node, yyDollar[4].token, meta.SemiColonToken)
|
||||
@ -2539,7 +2539,7 @@ yydefault:
|
||||
yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token))
|
||||
|
||||
// save comments
|
||||
yyDollar[1].token.Meta.SetTokenName(meta.UseToken).AppendTo(yyVAL.node.GetMeta())
|
||||
yyDollar[1].token.Meta.SetTokenName(meta.NodeStart).AppendTo(yyVAL.node.GetMeta())
|
||||
yyDollar[2].token.Meta.SetTokenName(meta.NodeStart).AppendTo(useType.GetMeta())
|
||||
yyDollar[4].token.Meta.SetTokenName(meta.SemiColonToken).AppendTo(yyVAL.node.GetMeta())
|
||||
yylex.(*Parser).appendMetaToken(yyVAL.node, yyDollar[4].token, meta.SemiColonToken)
|
||||
@ -4873,7 +4873,7 @@ yydefault:
|
||||
yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[3].node))
|
||||
|
||||
// save comments
|
||||
yyDollar[1].token.Meta.SetTokenName(meta.UseToken).AppendTo(yyVAL.node.GetMeta())
|
||||
yyDollar[1].token.Meta.SetTokenName(meta.NodeStart).AppendTo(yyVAL.node.GetMeta())
|
||||
|
||||
yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL)
|
||||
}
|
||||
@ -6825,7 +6825,7 @@ yydefault:
|
||||
yyVAL.ClosureUse.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token))
|
||||
|
||||
// save comments
|
||||
yyDollar[1].token.Meta.SetTokenName(meta.UseToken).AppendTo(yyVAL.ClosureUse.GetMeta())
|
||||
yyDollar[1].token.Meta.SetTokenName(meta.NodeStart).AppendTo(yyVAL.ClosureUse.GetMeta())
|
||||
yyDollar[2].token.Meta.SetTokenName(meta.OpenParenthesisToken).AppendTo(yyVAL.ClosureUse.GetMeta())
|
||||
yyDollar[4].token.Meta.SetTokenName(meta.CloseParenthesisToken).AppendTo(yyVAL.ClosureUse.GetMeta())
|
||||
|
||||
|
10
php5/php5.y
10
php5/php5.y
@ -435,7 +435,7 @@ top_statement:
|
||||
$$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3))
|
||||
|
||||
// save comments
|
||||
$1.Meta.SetTokenName(meta.UseToken).AppendTo($$.GetMeta())
|
||||
$1.Meta.SetTokenName(meta.NodeStart).AppendTo($$.GetMeta())
|
||||
$3.Meta.SetTokenName(meta.SemiColonToken).AppendTo($$.GetMeta())
|
||||
yylex.(*Parser).appendMetaToken($$, $3, meta.SemiColonToken)
|
||||
|
||||
@ -451,7 +451,7 @@ top_statement:
|
||||
$$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4))
|
||||
|
||||
// save comments
|
||||
$1.Meta.SetTokenName(meta.UseToken).AppendTo($$.GetMeta())
|
||||
$1.Meta.SetTokenName(meta.NodeStart).AppendTo($$.GetMeta())
|
||||
$2.Meta.SetTokenName(meta.NodeStart).AppendTo(useType.GetMeta())
|
||||
$4.Meta.SetTokenName(meta.SemiColonToken).AppendTo($$.GetMeta())
|
||||
yylex.(*Parser).appendMetaToken($$, $4, meta.SemiColonToken)
|
||||
@ -468,7 +468,7 @@ top_statement:
|
||||
$$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4))
|
||||
|
||||
// save comments
|
||||
$1.Meta.SetTokenName(meta.UseToken).AppendTo($$.GetMeta())
|
||||
$1.Meta.SetTokenName(meta.NodeStart).AppendTo($$.GetMeta())
|
||||
$2.Meta.SetTokenName(meta.NodeStart).AppendTo(useType.GetMeta())
|
||||
$4.Meta.SetTokenName(meta.SemiColonToken).AppendTo($$.GetMeta())
|
||||
yylex.(*Parser).appendMetaToken($$, $4, meta.SemiColonToken)
|
||||
@ -2677,7 +2677,7 @@ trait_use_statement:
|
||||
$$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $3))
|
||||
|
||||
// save comments
|
||||
$1.Meta.SetTokenName(meta.UseToken).AppendTo($$.GetMeta())
|
||||
$1.Meta.SetTokenName(meta.NodeStart).AppendTo($$.GetMeta())
|
||||
|
||||
yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL)
|
||||
}
|
||||
@ -4441,7 +4441,7 @@ lexical_vars:
|
||||
$$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4))
|
||||
|
||||
// save comments
|
||||
$1.Meta.SetTokenName(meta.UseToken).AppendTo($$.GetMeta())
|
||||
$1.Meta.SetTokenName(meta.NodeStart).AppendTo($$.GetMeta())
|
||||
$2.Meta.SetTokenName(meta.OpenParenthesisToken).AppendTo($$.GetMeta())
|
||||
$4.Meta.SetTokenName(meta.CloseParenthesisToken).AppendTo($$.GetMeta())
|
||||
|
||||
|
12
php7/php7.go
12
php7/php7.go
@ -2805,7 +2805,7 @@ yydefault:
|
||||
yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token))
|
||||
|
||||
// save comments
|
||||
yyDollar[1].token.Meta.SetTokenName(meta.UseToken).AppendTo(yyVAL.node.GetMeta())
|
||||
yyDollar[1].token.Meta.SetTokenName(meta.NodeStart).AppendTo(yyVAL.node.GetMeta())
|
||||
yyDollar[3].token.Meta.SetTokenName(meta.SemiColonToken).AppendTo(yyVAL.node.GetMeta())
|
||||
yylex.(*Parser).appendMetaToken(yyVAL.node, yyDollar[3].token, meta.SemiColonToken)
|
||||
|
||||
@ -2821,7 +2821,7 @@ yydefault:
|
||||
yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token))
|
||||
|
||||
// save comments
|
||||
yyDollar[1].token.Meta.SetTokenName(meta.UseToken).AppendTo(yyVAL.node.GetMeta())
|
||||
yyDollar[1].token.Meta.SetTokenName(meta.NodeStart).AppendTo(yyVAL.node.GetMeta())
|
||||
yyDollar[4].token.Meta.SetTokenName(meta.SemiColonToken).AppendTo(yyVAL.node.GetMeta())
|
||||
yylex.(*Parser).appendMetaToken(yyVAL.node, yyDollar[4].token, meta.SemiColonToken)
|
||||
|
||||
@ -2837,7 +2837,7 @@ yydefault:
|
||||
yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token))
|
||||
|
||||
// save comments
|
||||
yyDollar[1].token.Meta.SetTokenName(meta.UseToken).AppendTo(yyVAL.node.GetMeta())
|
||||
yyDollar[1].token.Meta.SetTokenName(meta.NodeStart).AppendTo(yyVAL.node.GetMeta())
|
||||
yyDollar[3].token.Meta.SetTokenName(meta.SemiColonToken).AppendTo(yyVAL.node.GetMeta())
|
||||
yylex.(*Parser).appendMetaToken(yyVAL.node, yyDollar[3].token, meta.SemiColonToken)
|
||||
|
||||
@ -2853,7 +2853,7 @@ yydefault:
|
||||
yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token))
|
||||
|
||||
// save comments
|
||||
yyDollar[1].token.Meta.SetTokenName(meta.UseToken).AppendTo(yyVAL.node.GetMeta())
|
||||
yyDollar[1].token.Meta.SetTokenName(meta.NodeStart).AppendTo(yyVAL.node.GetMeta())
|
||||
yyDollar[4].token.Meta.SetTokenName(meta.SemiColonToken).AppendTo(yyVAL.node.GetMeta())
|
||||
yylex.(*Parser).appendMetaToken(yyVAL.node, yyDollar[4].token, meta.SemiColonToken)
|
||||
|
||||
@ -4860,7 +4860,7 @@ yydefault:
|
||||
yyVAL.node.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[3].node))
|
||||
|
||||
// save comments
|
||||
yyDollar[1].token.Meta.SetTokenName(meta.UseToken).AppendTo(yyVAL.node.GetMeta())
|
||||
yyDollar[1].token.Meta.SetTokenName(meta.NodeStart).AppendTo(yyVAL.node.GetMeta())
|
||||
|
||||
yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL)
|
||||
}
|
||||
@ -6641,7 +6641,7 @@ yydefault:
|
||||
yyVAL.ClosureUse.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token))
|
||||
|
||||
// save comments
|
||||
yyDollar[1].token.Meta.SetTokenName(meta.UseToken).AppendTo(yyVAL.ClosureUse.GetMeta())
|
||||
yyDollar[1].token.Meta.SetTokenName(meta.NodeStart).AppendTo(yyVAL.ClosureUse.GetMeta())
|
||||
yyDollar[2].token.Meta.SetTokenName(meta.OpenParenthesisToken).AppendTo(yyVAL.ClosureUse.GetMeta())
|
||||
yyDollar[4].token.Meta.SetTokenName(meta.CloseParenthesisToken).AppendTo(yyVAL.ClosureUse.GetMeta())
|
||||
|
||||
|
12
php7/php7.y
12
php7/php7.y
@ -534,7 +534,7 @@ top_statement:
|
||||
$$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3))
|
||||
|
||||
// save comments
|
||||
$1.Meta.SetTokenName(meta.UseToken).AppendTo($$.GetMeta())
|
||||
$1.Meta.SetTokenName(meta.NodeStart).AppendTo($$.GetMeta())
|
||||
$3.Meta.SetTokenName(meta.SemiColonToken).AppendTo($$.GetMeta())
|
||||
yylex.(*Parser).appendMetaToken($$, $3, meta.SemiColonToken)
|
||||
|
||||
@ -548,7 +548,7 @@ top_statement:
|
||||
$$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4))
|
||||
|
||||
// save comments
|
||||
$1.Meta.SetTokenName(meta.UseToken).AppendTo($$.GetMeta())
|
||||
$1.Meta.SetTokenName(meta.NodeStart).AppendTo($$.GetMeta())
|
||||
$4.Meta.SetTokenName(meta.SemiColonToken).AppendTo($$.GetMeta())
|
||||
yylex.(*Parser).appendMetaToken($$, $4, meta.SemiColonToken)
|
||||
|
||||
@ -562,7 +562,7 @@ top_statement:
|
||||
$$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3))
|
||||
|
||||
// save comments
|
||||
$1.Meta.SetTokenName(meta.UseToken).AppendTo($$.GetMeta())
|
||||
$1.Meta.SetTokenName(meta.NodeStart).AppendTo($$.GetMeta())
|
||||
$3.Meta.SetTokenName(meta.SemiColonToken).AppendTo($$.GetMeta())
|
||||
yylex.(*Parser).appendMetaToken($$, $3, meta.SemiColonToken)
|
||||
|
||||
@ -576,7 +576,7 @@ top_statement:
|
||||
$$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4))
|
||||
|
||||
// save comments
|
||||
$1.Meta.SetTokenName(meta.UseToken).AppendTo($$.GetMeta())
|
||||
$1.Meta.SetTokenName(meta.NodeStart).AppendTo($$.GetMeta())
|
||||
$4.Meta.SetTokenName(meta.SemiColonToken).AppendTo($$.GetMeta())
|
||||
yylex.(*Parser).appendMetaToken($$, $4, meta.SemiColonToken)
|
||||
|
||||
@ -2463,7 +2463,7 @@ class_statement:
|
||||
$$.SetPosition(yylex.(*Parser).positionBuilder.NewTokenNodePosition($1, $3))
|
||||
|
||||
// save comments
|
||||
$1.Meta.SetTokenName(meta.UseToken).AppendTo($$.GetMeta())
|
||||
$1.Meta.SetTokenName(meta.NodeStart).AppendTo($$.GetMeta())
|
||||
|
||||
yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL)
|
||||
}
|
||||
@ -4067,7 +4067,7 @@ lexical_vars:
|
||||
$$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $4))
|
||||
|
||||
// save comments
|
||||
$1.Meta.SetTokenName(meta.UseToken).AppendTo($$.GetMeta())
|
||||
$1.Meta.SetTokenName(meta.NodeStart).AppendTo($$.GetMeta())
|
||||
$2.Meta.SetTokenName(meta.OpenParenthesisToken).AppendTo($$.GetMeta())
|
||||
$4.Meta.SetTokenName(meta.CloseParenthesisToken).AppendTo($$.GetMeta())
|
||||
|
||||
|
@ -1228,8 +1228,6 @@ func (p *Printer) printExprClone(n node.Node) {
|
||||
func (p *Printer) printExprClosureUse(n node.Node) {
|
||||
nn := n.(*expr.ClosureUse)
|
||||
p.printMeta(nn, meta.NodeStart)
|
||||
|
||||
p.printMeta(nn, meta.UseToken)
|
||||
io.WriteString(p.w, "use")
|
||||
p.printMeta(nn, meta.OpenParenthesisToken)
|
||||
io.WriteString(p.w, "(")
|
||||
@ -2342,7 +2340,6 @@ func (p *Printer) printStmtGroupUse(n node.Node) {
|
||||
nn := n.(*stmt.GroupUse)
|
||||
p.printMeta(nn, meta.NodeStart)
|
||||
|
||||
p.printMeta(nn, meta.UseToken)
|
||||
io.WriteString(p.w, "use")
|
||||
|
||||
if nn.UseType != nil {
|
||||
@ -2647,7 +2644,6 @@ func (p *Printer) printStmtTraitUse(n node.Node) {
|
||||
nn := n.(*stmt.TraitUse)
|
||||
p.printMeta(nn, meta.NodeStart)
|
||||
|
||||
p.printMeta(nn, meta.UseToken)
|
||||
io.WriteString(p.w, "use")
|
||||
p.joinPrint(",", nn.Traits)
|
||||
|
||||
@ -2725,7 +2721,6 @@ func (p *Printer) printStmtUseList(n node.Node) {
|
||||
nn := n.(*stmt.UseList)
|
||||
p.printMeta(nn, meta.NodeStart)
|
||||
|
||||
p.printMeta(nn, meta.UseToken)
|
||||
io.WriteString(p.w, "use")
|
||||
|
||||
if nn.UseType != nil {
|
||||
|
@ -3075,7 +3075,7 @@ func TestPrinterPrintExprClosureUse(t *testing.T) {
|
||||
&meta.Data{
|
||||
Type: meta.WhiteSpaceType,
|
||||
Value: " ",
|
||||
TokenName: meta.UseToken,
|
||||
TokenName: meta.NodeStart,
|
||||
},
|
||||
&meta.Data{
|
||||
Type: meta.WhiteSpaceType,
|
||||
@ -7116,7 +7116,7 @@ func TestPrinterPrintStmtGroupUse(t *testing.T) {
|
||||
&meta.Data{
|
||||
Type: meta.WhiteSpaceType,
|
||||
Value: " ",
|
||||
TokenName: meta.UseToken,
|
||||
TokenName: meta.NodeStart,
|
||||
},
|
||||
&meta.Data{
|
||||
Type: meta.WhiteSpaceType,
|
||||
@ -8202,7 +8202,7 @@ func TestPrinterPrintStmtTraitUse(t *testing.T) {
|
||||
&meta.Data{
|
||||
Type: meta.WhiteSpaceType,
|
||||
Value: " ",
|
||||
TokenName: meta.UseToken,
|
||||
TokenName: meta.NodeStart,
|
||||
},
|
||||
},
|
||||
Traits: []node.Node{
|
||||
@ -8242,7 +8242,7 @@ func TestPrinterPrintStmtTraitAdaptations(t *testing.T) {
|
||||
&meta.Data{
|
||||
Type: meta.WhiteSpaceType,
|
||||
Value: " ",
|
||||
TokenName: meta.UseToken,
|
||||
TokenName: meta.NodeStart,
|
||||
},
|
||||
},
|
||||
Traits: []node.Node{
|
||||
@ -8488,7 +8488,7 @@ func TestPrinterPrintStmtUseList(t *testing.T) {
|
||||
&meta.Data{
|
||||
Type: meta.WhiteSpaceType,
|
||||
Value: " ",
|
||||
TokenName: meta.UseToken,
|
||||
TokenName: meta.NodeStart,
|
||||
},
|
||||
&meta.Data{
|
||||
Type: meta.WhiteSpaceType,
|
||||
|
Loading…
Reference in New Issue
Block a user