mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-03 06:15:52 +01:00
Support parsing and testing unimplemented expressions (#957)
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
be0c1e9da6
commit
dc5e62fc7a
@@ -190,6 +190,7 @@
|
||||
TRUE
|
||||
TYPE
|
||||
UNDERSCORE
|
||||
UNIMPL_EXAMPLE
|
||||
VAR
|
||||
WHILE
|
||||
// table-end
|
||||
@@ -223,6 +224,7 @@
|
||||
// same precedence as POSTFIX_STAR.
|
||||
%precedence POSTFIX_STAR UNARY_STAR
|
||||
%left PERIOD ARROW
|
||||
%nonassoc UNIMPL_EXAMPLE
|
||||
%precedence
|
||||
LEFT_PARENTHESIS
|
||||
RIGHT_PARENTHESIS
|
||||
@@ -381,6 +383,11 @@ expression:
|
||||
}
|
||||
| FN_TYPE tuple ARROW expression
|
||||
{ $$ = arena->New<FunctionTypeLiteral>(context.source_loc(), $2, $4); }
|
||||
| expression UNIMPL_EXAMPLE expression
|
||||
{
|
||||
$$ = arena->New<UnimplementedExpression>(context.source_loc(),
|
||||
"ExampleInfix", $1, $3);
|
||||
}
|
||||
;
|
||||
designator: PERIOD identifier { $$ = $2; }
|
||||
;
|
||||
|
||||
Reference in New Issue
Block a user