Randomize type declaration order

This commit is contained in:
2025-03-12 23:56:54 +01:00
parent c9a8ecdc0a
commit ac084be7f5
5 changed files with 48 additions and 28 deletions

View File

@ -28,14 +28,24 @@ namespace elna
{
namespace boot
{
class declaration_error : public error
class undeclared_error : public error
{
std::string identifier;
public:
declaration_error(const std::string& identifier, const char *path, const struct position position);
undeclared_error(const std::string& identifier, const char *path, const struct position position);
virtual std::string what() const override;
std::string what() const override;
};
class already_declared_error : public error
{
std::string identifier;
public:
already_declared_error(const std::string& identifier, const char *path, const struct position position);
std::string what() const override;
};
class declaration_visitor final : public empty_visitor, public error_container

View File

@ -50,7 +50,7 @@ namespace boot
union
{
std::weak_ptr<alias_type> alias;
std::weak_ptr<primitive_type> primitive;
std::shared_ptr<primitive_type> primitive;
std::shared_ptr<record_type> record;
std::shared_ptr<union_type> _union;
std::shared_ptr<pointer_type> pointer;