aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/elna/boot/ast.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/elna/boot/ast.h b/include/elna/boot/ast.h
index 35cfc8d..6edeb25 100644
--- a/include/elna/boot/ast.h
+++ b/include/elna/boot/ast.h
@@ -611,24 +611,24 @@ namespace elna::boot
*/
class variable_declaration : public declaration
{
- std::shared_ptr<type_expression> m_variable_type;
-
public:
variable_declaration(const source_position position,
- std::vector<identifier_definition>&& identifier, std::shared_ptr<type_expression> variable_type,
- expression *initializer = nullptr);
+ std::vector<identifier_definition>&& identifier, type_expression *variable_type,
+ expression *initializer = nullptr, const bool is_const = false);
variable_declaration(const source_position position,
- std::vector<identifier_definition>&& identifier, std::shared_ptr<type_expression> variable_type,
+ std::vector<identifier_definition>&& identifier, type_expression *variable_type,
std::monostate);
+ ~variable_declaration() override;
void accept(parser_visitor *visitor) override;
bool has_initializer() const;
const std::vector<identifier_definition> identifiers;
- type_expression& variable_type();
+ type_expression *const variable_type{ nullptr };
expression *initializer{ nullptr };
const bool is_extern{ false };
+ const bool is_const{ false };
/// Whether the variable was declared in a \c threadvar section.
bool is_thread_local{ false };