remove meta.BackquoteToken
This commit is contained in:
parent
e036135fab
commit
6dde9ef052
@ -98,7 +98,6 @@ const (
|
||||
IsGreaterOrEqualToken
|
||||
HaltCompilerToken
|
||||
CaseSeparatorToken // ';' or ':'
|
||||
BackquoteToken // '`'
|
||||
OpenCurlyBracesToken // '{'
|
||||
CloseCurlyBracesToken // '}'
|
||||
SemiColonToken // ';'
|
||||
|
@ -4,9 +4,9 @@ package meta
|
||||
|
||||
import "strconv"
|
||||
|
||||
const _TokenName_name = "NodeStartNodeEndIfTokenStringVarnameTokenNumStringTokenInlineHTMLTokenEchoTokenDoTokenWhileTokenEndwhileTokenForInitSemicolonTokenForCondSemicolonTokenForTokenEndforTokenForeachTokenEndforeachTokenDeclareTokenEnddeclareTokenAsTokenSwitchTokenEndswitchTokenCaseTokenDefaultTokenBreakTokenContinueTokenGotoTokenFunctionTokenConstTokenReturnTokenTryTokenCatchTokenFinallyTokenThrowTokenInsteadofTokenGlobalTokenVarTokenUnsetTokenClassTokenTraitTokenInterfaceTokenExtendsTokenImplementsTokenDoubleArrowTokenCallableTokenCurlyOpenTokenPaamayimNekudotayimTokenUseLeadingNsSeparatorTokenNsSeparatorTokenEllipsisTokenLogicalOrTokenLogicalXorTokenLogicalAndTokenInstanceofTokenElseifTokenElseTokenEndifTokenYieldTokenAbstractTokenFinalTokenPrivateTokenProtectedTokenPublicTokenIncTokenDecTokenYieldFromTokenObjectOperatorTokenCoalesceTokenSpaceshipTokenPlusEqualTokenMinusEqualTokenMulEqualTokenPowEqualTokenDivEqualTokenConcatEqualTokenModEqualTokenAndEqualTokenOrEqualTokenXorEqualTokenSlEqualTokenSrEqualTokenBooleanOrTokenBooleanAndTokenPowTokenSlTokenSrTokenIsIdenticalTokenIsNotIdenticalTokenIsEqualTokenIsNotEqualTokenIsSmallerOrEqualTokenIsGreaterOrEqualTokenHaltCompilerTokenCaseSeparatorTokenBackquoteTokenOpenCurlyBracesTokenCloseCurlyBracesTokenSemiColonTokenColonTokenOpenParenthesisTokenCloseParenthesisTokenOpenSquareBracketCloseSquareBracketQuestionMarkTokenAmpersandTokenMinusTokenPlusTokenCommaTokenVerticalBarTokenEqualTokenCaretTokenAsteriskTokenSlashTokenPercentTokenLessTokenGreaterTokenDotToken"
|
||||
const _TokenName_name = "NodeStartNodeEndIfTokenStringVarnameTokenNumStringTokenInlineHTMLTokenEchoTokenDoTokenWhileTokenEndwhileTokenForInitSemicolonTokenForCondSemicolonTokenForTokenEndforTokenForeachTokenEndforeachTokenDeclareTokenEnddeclareTokenAsTokenSwitchTokenEndswitchTokenCaseTokenDefaultTokenBreakTokenContinueTokenGotoTokenFunctionTokenConstTokenReturnTokenTryTokenCatchTokenFinallyTokenThrowTokenInsteadofTokenGlobalTokenVarTokenUnsetTokenClassTokenTraitTokenInterfaceTokenExtendsTokenImplementsTokenDoubleArrowTokenCallableTokenCurlyOpenTokenPaamayimNekudotayimTokenUseLeadingNsSeparatorTokenNsSeparatorTokenEllipsisTokenLogicalOrTokenLogicalXorTokenLogicalAndTokenInstanceofTokenElseifTokenElseTokenEndifTokenYieldTokenAbstractTokenFinalTokenPrivateTokenProtectedTokenPublicTokenIncTokenDecTokenYieldFromTokenObjectOperatorTokenCoalesceTokenSpaceshipTokenPlusEqualTokenMinusEqualTokenMulEqualTokenPowEqualTokenDivEqualTokenConcatEqualTokenModEqualTokenAndEqualTokenOrEqualTokenXorEqualTokenSlEqualTokenSrEqualTokenBooleanOrTokenBooleanAndTokenPowTokenSlTokenSrTokenIsIdenticalTokenIsNotIdenticalTokenIsEqualTokenIsNotEqualTokenIsSmallerOrEqualTokenIsGreaterOrEqualTokenHaltCompilerTokenCaseSeparatorTokenOpenCurlyBracesTokenCloseCurlyBracesTokenSemiColonTokenColonTokenOpenParenthesisTokenCloseParenthesisTokenOpenSquareBracketCloseSquareBracketQuestionMarkTokenAmpersandTokenMinusTokenPlusTokenCommaTokenVerticalBarTokenEqualTokenCaretTokenAsteriskTokenSlashTokenPercentTokenLessTokenGreaterTokenDotToken"
|
||||
|
||||
var _TokenName_index = [...]uint16{0, 9, 16, 23, 41, 55, 70, 79, 86, 96, 109, 130, 151, 159, 170, 182, 197, 209, 224, 231, 242, 256, 265, 277, 287, 300, 309, 322, 332, 343, 351, 361, 373, 383, 397, 408, 416, 426, 436, 446, 460, 472, 487, 503, 516, 530, 554, 580, 596, 609, 623, 638, 653, 668, 679, 688, 698, 708, 721, 731, 743, 757, 768, 776, 784, 798, 817, 830, 844, 858, 873, 886, 899, 912, 928, 941, 954, 966, 979, 991, 1003, 1017, 1032, 1040, 1047, 1054, 1070, 1089, 1101, 1116, 1137, 1158, 1175, 1193, 1207, 1227, 1248, 1262, 1272, 1292, 1313, 1330, 1348, 1365, 1379, 1389, 1398, 1408, 1424, 1434, 1444, 1457, 1467, 1479, 1488, 1500, 1508}
|
||||
var _TokenName_index = [...]uint16{0, 9, 16, 23, 41, 55, 70, 79, 86, 96, 109, 130, 151, 159, 170, 182, 197, 209, 224, 231, 242, 256, 265, 277, 287, 300, 309, 322, 332, 343, 351, 361, 373, 383, 397, 408, 416, 426, 436, 446, 460, 472, 487, 503, 516, 530, 554, 580, 596, 609, 623, 638, 653, 668, 679, 688, 698, 708, 721, 731, 743, 757, 768, 776, 784, 798, 817, 830, 844, 858, 873, 886, 899, 912, 928, 941, 954, 966, 979, 991, 1003, 1017, 1032, 1040, 1047, 1054, 1070, 1089, 1101, 1116, 1137, 1158, 1175, 1193, 1213, 1234, 1248, 1258, 1278, 1299, 1316, 1334, 1351, 1365, 1375, 1384, 1394, 1410, 1420, 1430, 1443, 1453, 1465, 1474, 1486, 1494}
|
||||
|
||||
func (i TokenName) String() string {
|
||||
if i < 0 || i >= TokenName(len(_TokenName_index)-1) {
|
||||
|
443
php5/php5.go
443
php5/php5.go
File diff suppressed because it is too large
Load Diff
@ -4201,8 +4201,7 @@ expr_without_variable:
|
||||
$$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3))
|
||||
|
||||
// save comments
|
||||
$1.Meta.SetTokenName(meta.BackquoteToken).AppendTo($$.GetMeta())
|
||||
$3.Meta.SetTokenName(meta.BackquoteToken).AppendTo($$.GetMeta())
|
||||
$1.Meta.SetTokenName(meta.NodeStart).AppendTo($$.GetMeta())
|
||||
|
||||
yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL)
|
||||
}
|
||||
|
257
php7/php7.go
257
php7/php7.go
File diff suppressed because it is too large
Load Diff
@ -3924,8 +3924,7 @@ expr_without_variable:
|
||||
$$.SetPosition(yylex.(*Parser).positionBuilder.NewTokensPosition($1, $3))
|
||||
|
||||
// save comments
|
||||
$1.Meta.SetTokenName(meta.BackquoteToken).AppendTo($$.GetMeta())
|
||||
$3.Meta.SetTokenName(meta.BackquoteToken).AppendTo($$.GetMeta())
|
||||
$1.Meta.SetTokenName(meta.NodeStart).AppendTo($$.GetMeta())
|
||||
|
||||
yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL)
|
||||
}
|
||||
|
@ -1545,7 +1545,6 @@ func (p *Printer) printExprShellExec(n node.Node) {
|
||||
nn := n.(*expr.ShellExec)
|
||||
p.printMeta(nn, meta.NodeStart)
|
||||
|
||||
p.printMeta(nn, meta.BackquoteToken)
|
||||
io.WriteString(p.w, "`")
|
||||
for _, part := range nn.Parts {
|
||||
p.Print(part)
|
||||
|
@ -4175,7 +4175,7 @@ func TestPrinterPrintShellExec(t *testing.T) {
|
||||
&meta.Data{
|
||||
Type: meta.WhiteSpaceType,
|
||||
Value: " ",
|
||||
TokenName: meta.BackquoteToken,
|
||||
TokenName: meta.NodeStart,
|
||||
},
|
||||
},
|
||||
Parts: []node.Node{
|
||||
|
Loading…
Reference in New Issue
Block a user