Skip to content

Commit 7f82e0f

Browse files
committed
Merge pull request #4566 from redstar/centliteral
Add tokens for signed/unsigned 128bit integer values.
2 parents 67675a5 + a9f0564 commit 7f82e0f

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

src/parse.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2792,6 +2792,8 @@ Objects *Parser::parseTemplateSingleArgument()
27922792
case TOKuns32v:
27932793
case TOKint64v:
27942794
case TOKuns64v:
2795+
case TOKint128v:
2796+
case TOKuns128v:
27952797
case TOKfloat32v:
27962798
case TOKfloat64v:
27972799
case TOKfloat80v:
@@ -4482,6 +4484,8 @@ Statement *Parser::parseStatement(int flags, const utf8_t** endPtr, Loc *pEndloc
44824484
case TOKuns32v:
44834485
case TOKint64v:
44844486
case TOKuns64v:
4487+
case TOKint128v:
4488+
case TOKuns128v:
44854489
case TOKfloat32v:
44864490
case TOKfloat64v:
44874491
case TOKfloat80v:
@@ -5676,6 +5680,8 @@ bool Parser::isBasicType(Token **pt)
56765680
case TOKuns32v:
56775681
case TOKint64v:
56785682
case TOKuns64v:
5683+
case TOKint128v:
5684+
case TOKuns128v:
56795685
case TOKfloat32v:
56805686
case TOKfloat64v:
56815687
case TOKfloat80v:
@@ -7129,6 +7135,8 @@ Expression *Parser::parseUnaryExp()
71297135
case TOKuns32v:
71307136
case TOKint64v:
71317137
case TOKuns64v:
7138+
case TOKint128v:
7139+
case TOKuns128v:
71327140
case TOKfloat32v:
71337141
case TOKfloat64v:
71347142
case TOKfloat80v:

src/tokens.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ enum TOK
107107
// Numeric literals
108108
TOKint32v, TOKuns32v,
109109
TOKint64v, TOKuns64v,
110+
TOKint128v, TOKuns128v,
110111
TOKfloat32v, TOKfloat64v, TOKfloat80v,
111112
TOKimaginary32v, TOKimaginary64v, TOKimaginary80v,
112113

@@ -131,7 +132,7 @@ enum TOK
131132
TOKcomplex32, TOKcomplex64, TOKcomplex80,
132133
TOKchar, TOKwchar, TOKdchar, TOKbool,
133134

134-
// 157
135+
// 159
135136
// Aggregates
136137
TOKstruct, TOKclass, TOKinterface, TOKunion, TOKenum, TOKimport,
137138
TOKtypedef, TOKalias, TOKoverride, TOKdelegate, TOKfunction,

0 commit comments

Comments
 (0)