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'
TokenCHeredoc TokenType = 'h'
TokenDot TokenType = '.'
TokenStar TokenType = '*'
TokenSlash TokenType = '/'
TokenPlus TokenType = '+'
TokenMinus TokenType = '-'
TokenStar TokenType = '*'
TokenSlash TokenType = '/'
TokenPlus TokenType = '+'
TokenMinus TokenType = '-'
TokenPercent TokenType = '%'
TokenEqual TokenType = '='
TokenNotEqual TokenType = '≠'
@ -57,6 +57,8 @@ const (
TokenOr TokenType = ''
TokenBang TokenType = '!'
TokenDot TokenType = '.'
TokenQuestion TokenType = '?'
TokenColon TokenType = ':'

View File

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