mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 17:31:07 +01:00
@@ -154,7 +154,7 @@ void Carbon::Parser::error(const location_type&, const std::string& message) {
|
||||
%token RETURN
|
||||
%token TRUE
|
||||
%token FALSE
|
||||
%token STRUCT
|
||||
%token CLASS
|
||||
%token CHOICE
|
||||
%token MATCH
|
||||
%token CASE
|
||||
@@ -570,9 +570,9 @@ declaration:
|
||||
{ $$ = global_arena->RawNew<FunctionDeclaration>($1); }
|
||||
| function_declaration
|
||||
{ $$ = global_arena->RawNew<FunctionDeclaration>($1); }
|
||||
| STRUCT identifier "{" member_list "}"
|
||||
| CLASS identifier "{" member_list "}"
|
||||
{
|
||||
$$ = global_arena->RawNew<StructDeclaration>(yylineno, $2, $4);
|
||||
$$ = global_arena->RawNew<ClassDeclaration>(yylineno, $2, $4);
|
||||
}
|
||||
| CHOICE identifier "{" alternative_list "}"
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user