mirror of
https://codeberg.org/ProgramSnail/lang.git
synced 2025-12-06 23:18:45 +00:00
fixes, refactoring (shorter names, visitor)
This commit is contained in:
parent
57b1172a4f
commit
f58bfd938c
20 changed files with 564 additions and 764 deletions
|
|
@ -49,44 +49,42 @@ public:
|
|||
|
||||
void print(std::ostream &out) {
|
||||
printers::Printer printer(out, 2, 80, true);
|
||||
printers::print_source_file(statements_, printer);
|
||||
printers::print(statements_, printer);
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
nodes::ExpressionStorage *get_expression_storage() {
|
||||
return &expression_storage_;
|
||||
}
|
||||
nodes::ExpressionStorage *expressions() { return &expression_storage_; }
|
||||
|
||||
const nodes::ExpressionStorage *get_expression_storage() const {
|
||||
const nodes::ExpressionStorage *expressions() const {
|
||||
return &expression_storage_;
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
nodes::TypeStorage *get_type_storage() { return &type_storage_; }
|
||||
nodes::TypeStorage *types() { return &type_storage_; }
|
||||
|
||||
const nodes::TypeStorage *get_type_storage() const { return &type_storage_; }
|
||||
const nodes::TypeStorage *types() const { return &type_storage_; }
|
||||
|
||||
//
|
||||
|
||||
names::NameTree *get_name_tree() { return &name_tree_; }
|
||||
names::NameTree *names() { return &name_tree_; }
|
||||
|
||||
const names::NameTree *get_name_tree() const { return &name_tree_; }
|
||||
const names::NameTree *names() const { return &name_tree_; }
|
||||
|
||||
//
|
||||
|
||||
error_handling::ErrorLog *get_error_log() { return &error_log_; }
|
||||
error_handling::ErrorLog *errors() { return &error_log_; }
|
||||
|
||||
const error_handling::ErrorLog *get_error_log() const { return &error_log_; }
|
||||
const error_handling::ErrorLog *errors() const { return &error_log_; }
|
||||
|
||||
//
|
||||
|
||||
size_t statements_size() const { return statements_.size(); }
|
||||
|
||||
nodes::Statement *get_statement(size_t id) { return &statements_.at(id); }
|
||||
nodes::Statement *statement(size_t id) { return &statements_.at(id); }
|
||||
|
||||
const nodes::Statement *get_statement(size_t id) const {
|
||||
const nodes::Statement *statement(size_t id) const {
|
||||
return &statements_.at(id);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue