Allow empty var sections
This commit is contained in:
@ -530,7 +530,7 @@ variable_declarations:
|
||||
$$.reserve($$.size() + $3.size());
|
||||
$$.insert(std::end($$), std::begin($3), std::end($3));
|
||||
}
|
||||
| variable_declaration { std::swap($$, $1); }
|
||||
| /* no variable declarations */ {}
|
||||
variable_part:
|
||||
/* no variable declarations */ {}
|
||||
| "var" variable_declarations { std::swap($$, $2); }
|
||||
@ -553,9 +553,9 @@ type_definition: identifier_definition "=" type_expression
|
||||
$$ = new boot::type_definition(boot::make_position(@1), $1.first, $1.second, $3);
|
||||
}
|
||||
type_definitions:
|
||||
type_definition type_definitions
|
||||
type_definition ";" type_definitions
|
||||
{
|
||||
std::swap($$, $2);
|
||||
std::swap($$, $3);
|
||||
$$.insert($$.cbegin(), $1);
|
||||
}
|
||||
| /* no type definitions */ {}
|
||||
|
Reference in New Issue
Block a user