Allow exporting global external variables

This commit is contained in:
2025-08-24 16:54:48 +02:00
parent fd3729ba16
commit c95466622a
7 changed files with 56 additions and 52 deletions

View File

@@ -31,7 +31,7 @@ namespace elna::boot
public:
std::unique_ptr<unit> tree;
std::unordered_map<std::string, std::shared_ptr<alias_type>> unresolved;
forward_table unresolved;
explicit dependency(const char *path);
};

View File

@@ -31,6 +31,15 @@ along with GCC; see the file COPYING3. If not see
namespace elna::gcc
{
struct linemap_guard
{
explicit linemap_guard(const char *filename);
linemap_guard(const linemap_guard&) = delete;
linemap_guard(linemap_guard&&) = delete;
~linemap_guard();
};
location_t get_location(const boot::position *position);
std::string print_type(tree type);
void report_errors(const std::deque<std::unique_ptr<boot::error>>& errors);

View File

@@ -80,7 +80,6 @@ namespace elna::gcc
void visit(boot::binary_expression *expression) override;
void visit(boot::unary_expression *expression) override;
void visit(boot::constant_declaration *definition) override;
void visit(boot::type_declaration *declaration) override;
void visit(boot::variable_declaration *declaration) override;
void visit(boot::variable_expression *expression) override;
void visit(boot::array_access_expression *expression) override;