zclsyntax: add TokenPercent

This was missed on the first pass, and is needed for the modulo operator.
This commit is contained in:
Martin Atkins 2017-05-31 07:31:49 -07:00
parent d003da232e
commit effa9a97b5
2 changed files with 53 additions and 50 deletions

View File

@ -40,11 +40,11 @@ const (
TokenOHeredoc TokenType = 'H' TokenOHeredoc TokenType = 'H'
TokenCHeredoc TokenType = 'h' TokenCHeredoc TokenType = 'h'
TokenDot TokenType = '.'
TokenStar TokenType = '*' TokenStar TokenType = '*'
TokenSlash TokenType = '/' TokenSlash TokenType = '/'
TokenPlus TokenType = '+' TokenPlus TokenType = '+'
TokenMinus TokenType = '-' TokenMinus TokenType = '-'
TokenPercent TokenType = '%'
TokenEqual TokenType = '=' TokenEqual TokenType = '='
TokenNotEqual TokenType = '≠' TokenNotEqual TokenType = '≠'
@ -57,6 +57,8 @@ const (
TokenOr TokenType = '' TokenOr TokenType = ''
TokenBang TokenType = '!' TokenBang TokenType = '!'
TokenDot TokenType = '.'
TokenQuestion TokenType = '?' TokenQuestion TokenType = '?'
TokenColon TokenType = ':' TokenColon TokenType = ':'

View File

@ -4,56 +4,57 @@ package zclsyntax
import "fmt" import "fmt"
const _TokenType_name = "TokenNilTokenNewlineTokenBangTokenBitwiseAndTokenOParenTokenCParenTokenStarTokenPlusTokenMinusTokenDotTokenSlashTokenColonTokenSemicolonTokenLessThanTokenEqualTokenGreaterThanTokenQuestionTokenCommentTokenOHeredocTokenIdentTokenNumberLitTokenQuotedLitTokenStringLitTokenOBrackTokenCBrackTokenBitwiseXorTokenBacktickTokenCHeredocTokenOBraceTokenBitwiseOrTokenCBraceTokenBitwiseNotTokenOQuoteTokenCQuoteTokenTemplateControlTokenTemplateSeqEndTokenAndTokenOrTokenTemplateInterpTokenNotEqualTokenLessThanEqTokenGreaterThanEqTokenEOFTokenTabsTokenStarStarTokenInvalidTokenBadUTF8" const _TokenType_name = "TokenNilTokenNewlineTokenBangTokenPercentTokenBitwiseAndTokenOParenTokenCParenTokenStarTokenPlusTokenMinusTokenDotTokenSlashTokenColonTokenSemicolonTokenLessThanTokenEqualTokenGreaterThanTokenQuestionTokenCommentTokenOHeredocTokenIdentTokenNumberLitTokenQuotedLitTokenStringLitTokenOBrackTokenCBrackTokenBitwiseXorTokenBacktickTokenCHeredocTokenOBraceTokenBitwiseOrTokenCBraceTokenBitwiseNotTokenOQuoteTokenCQuoteTokenTemplateControlTokenTemplateSeqEndTokenAndTokenOrTokenTemplateInterpTokenNotEqualTokenLessThanEqTokenGreaterThanEqTokenEOFTokenTabsTokenStarStarTokenInvalidTokenBadUTF8"
var _TokenType_map = map[TokenType]string{ var _TokenType_map = map[TokenType]string{
0: _TokenType_name[0:8], 0: _TokenType_name[0:8],
10: _TokenType_name[8:20], 10: _TokenType_name[8:20],
33: _TokenType_name[20:29], 33: _TokenType_name[20:29],
38: _TokenType_name[29:44], 37: _TokenType_name[29:41],
40: _TokenType_name[44:55], 38: _TokenType_name[41:56],
41: _TokenType_name[55:66], 40: _TokenType_name[56:67],
42: _TokenType_name[66:75], 41: _TokenType_name[67:78],
43: _TokenType_name[75:84], 42: _TokenType_name[78:87],
45: _TokenType_name[84:94], 43: _TokenType_name[87:96],
46: _TokenType_name[94:102], 45: _TokenType_name[96:106],
47: _TokenType_name[102:112], 46: _TokenType_name[106:114],
58: _TokenType_name[112:122], 47: _TokenType_name[114:124],
59: _TokenType_name[122:136], 58: _TokenType_name[124:134],
60: _TokenType_name[136:149], 59: _TokenType_name[134:148],
61: _TokenType_name[149:159], 60: _TokenType_name[148:161],
62: _TokenType_name[159:175], 61: _TokenType_name[161:171],
63: _TokenType_name[175:188], 62: _TokenType_name[171:187],
67: _TokenType_name[188:200], 63: _TokenType_name[187:200],
72: _TokenType_name[200:213], 67: _TokenType_name[200:212],
73: _TokenType_name[213:223], 72: _TokenType_name[212:225],
78: _TokenType_name[223:237], 73: _TokenType_name[225:235],
81: _TokenType_name[237:251], 78: _TokenType_name[235:249],
83: _TokenType_name[251:265], 81: _TokenType_name[249:263],
91: _TokenType_name[265:276], 83: _TokenType_name[263:277],
93: _TokenType_name[276:287], 91: _TokenType_name[277:288],
94: _TokenType_name[287:302], 93: _TokenType_name[288:299],
96: _TokenType_name[302:315], 94: _TokenType_name[299:314],
104: _TokenType_name[315:328], 96: _TokenType_name[314:327],
123: _TokenType_name[328:339], 104: _TokenType_name[327:340],
124: _TokenType_name[339:353], 123: _TokenType_name[340:351],
125: _TokenType_name[353:364], 124: _TokenType_name[351:365],
126: _TokenType_name[364:379], 125: _TokenType_name[365:376],
171: _TokenType_name[379:390], 126: _TokenType_name[376:391],
187: _TokenType_name[390:401], 171: _TokenType_name[391:402],
955: _TokenType_name[401:421], 187: _TokenType_name[402:413],
8718: _TokenType_name[421:440], 955: _TokenType_name[413:433],
8743: _TokenType_name[440:448], 8718: _TokenType_name[433:452],
8744: _TokenType_name[448:455], 8743: _TokenType_name[452:460],
8747: _TokenType_name[455:474], 8744: _TokenType_name[460:467],
8800: _TokenType_name[474:487], 8747: _TokenType_name[467:486],
8804: _TokenType_name[487:502], 8800: _TokenType_name[486:499],
8805: _TokenType_name[502:520], 8804: _TokenType_name[499:514],
9220: _TokenType_name[520:528], 8805: _TokenType_name[514:532],
9225: _TokenType_name[528:537], 9220: _TokenType_name[532:540],
10138: _TokenType_name[537:550], 9225: _TokenType_name[540:549],
65533: _TokenType_name[550:562], 10138: _TokenType_name[549:562],
128169: _TokenType_name[562:574], 65533: _TokenType_name[562:574],
128169: _TokenType_name[574:586],
} }
func (i TokenType) String() string { func (i TokenType) String() string {