File tree Expand file tree Collapse file tree 3 files changed +5
-1
lines changed
third-party/thrift/src/thrift/compiler/whisker Expand file tree Collapse file tree 3 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -183,7 +183,7 @@ TEST_F(LexerTest, multiple_identifiers) {
183
183
}
184
184
185
185
TEST_F (LexerTest, ids_and_punctuations) {
186
- auto lexer = make_lexer (" {{ |. ! bas ^> = ic /# }}{{()}}" );
186
+ auto lexer = make_lexer (" {{ |. ! bas ^> =* ic /# }}{{()}}" );
187
187
const std::vector<token_description> expected = {
188
188
{tok::open, {}},
189
189
{tok::pipe, {}},
@@ -193,6 +193,7 @@ TEST_F(LexerTest, ids_and_punctuations) {
193
193
{tok::caret, {}},
194
194
{tok::gt, {}},
195
195
{tok::eq, {}},
196
+ {tok::star, {}},
196
197
{tok::identifier, " ic" },
197
198
{tok::slash, {}},
198
199
{tok::pound, {}},
Original file line number Diff line number Diff line change @@ -91,6 +91,7 @@ constexpr token_kind_info info[] = {
91
91
{tok::pipe, " `|`" },
92
92
{tok::gt, " `>`" },
93
93
{tok::eq, " `=`" },
94
+ {tok::star, " `*`" },
94
95
95
96
#define WHISKER_KEYWORD (kw ) {tok::kw_##kw, " `" #kw " `" },
96
97
WHISKER_KEYWORDS ()
Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ enum class tok : unsigned {
62
62
pipe, // "|"
63
63
gt, // ">"
64
64
eq, // "="
65
+ star, // "*"
65
66
// clang-format on
66
67
67
68
// Literals:
@@ -114,6 +115,7 @@ constexpr tok to_tok(char c) {
114
115
case ' |' : return tok::pipe;
115
116
case ' >' : return tok::gt;
116
117
case ' =' : return tok::eq;
118
+ case ' *' : return tok::star;
117
119
default :
118
120
return tok::error;
119
121
}
You can’t perform that action at this time.
0 commit comments