Allow extern variables
This commit is contained in:
@@ -508,6 +508,12 @@ variable_declaration:
|
||||
std::shared_ptr<boot::type_expression> shared_type{ $3 };
|
||||
$$ = new boot::variable_declaration( boot::make_position(@2), std::move($1), shared_type);
|
||||
}
|
||||
| identifier_definitions ":" type_expression ":=" "extern" ";"
|
||||
{
|
||||
std::shared_ptr<boot::type_expression> shared_type{ $3 };
|
||||
$$ = new boot::variable_declaration( boot::make_position(@2), std::move($1), shared_type,
|
||||
std::monostate{});
|
||||
}
|
||||
| identifier_definitions ":" type_expression ":=" expression ";"
|
||||
{
|
||||
std::shared_ptr<boot::type_expression> shared_type{ $3 };
|
||||
@@ -550,7 +556,7 @@ import_declarations:
|
||||
std::swap($$, $3);
|
||||
$$.emplace($$.cbegin(), new boot::import_declaration(boot::make_position(@1), std::move($1)));
|
||||
}
|
||||
| import_declaration
|
||||
| import_declaration
|
||||
{
|
||||
$$.emplace_back(new boot::import_declaration(boot::make_position(@1), std::move($1)));
|
||||
}
|
||||
|
Reference in New Issue
Block a user