mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 10:21:04 +01:00
Add support for _ placeholder. (#661)
Co-authored-by: Jon Meow <46229924+jonmeow@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
co-authored by
Jon Meow
parent
c3c89a77a4
commit
def98d1182
@@ -56,6 +56,7 @@ CONTINUATION_TYPE "__Continuation"
|
||||
CONTINUATION "__continuation"
|
||||
RUN "__run"
|
||||
AWAIT "__await"
|
||||
UNDERSCORE "_"
|
||||
|
||||
identifier [A-Za-z_][A-Za-z0-9_]*
|
||||
integer_literal [0-9]+
|
||||
@@ -116,6 +117,7 @@ operand_start [(A-Za-z0-9_"]
|
||||
{CONTINUATION} { return yy::parser::make_CONTINUATION(context.current_token_position); }
|
||||
{RUN} { return yy::parser::make_RUN(context.current_token_position); }
|
||||
{AWAIT} { return yy::parser::make_AWAIT(context.current_token_position); }
|
||||
{UNDERSCORE} { return yy::parser::make_UNDERSCORE(context.current_token_position); }
|
||||
|
||||
"=" return yy::parser::make_EQUAL(context.current_token_position);
|
||||
"-" return yy::parser::make_MINUS(context.current_token_position);
|
||||
|
||||
Reference in New Issue
Block a user