mirror of
https://codeberg.org/ProgramSnail/lang.git
synced 2025-12-17 12:28:47 +00:00
or references, prining improvements, comments now printed, fixes
This commit is contained in:
parent
73263193a9
commit
5e70f0015f
19 changed files with 354 additions and 429 deletions
|
|
@ -42,6 +42,12 @@ public:
|
|||
print_spaces(indentation);
|
||||
}
|
||||
|
||||
void to_indentation_level() {
|
||||
if (indentation_level_ > current_position_) {
|
||||
print_spaces(indentation_level_ - current_position_);
|
||||
}
|
||||
}
|
||||
|
||||
void indent() { indentation_level_ += tab_width_; }
|
||||
|
||||
void deindent() { indentation_level_ -= tab_width_; }
|
||||
|
|
@ -118,7 +124,8 @@ private:
|
|||
size_t indentation_level_ = 0;
|
||||
};
|
||||
|
||||
void print_modifier(const nodes::Modifier &modifier, Printer &printer);
|
||||
void print_modifier(const nodes::Modifier &modifier, Printer &printer,
|
||||
bool const_is_none = false);
|
||||
|
||||
void print_literal(const nodes::Literal &literal, Printer &printer);
|
||||
|
||||
|
|
@ -126,6 +133,8 @@ void print_identifier(const nodes::Identifier &identifier, Printer &printer);
|
|||
|
||||
void print_annotation(const std::string &annotation, Printer &printer);
|
||||
|
||||
void print_extra(const nodes::Extra &extra, Printer &printer);
|
||||
|
||||
void print_empty_lines(const nodes::EmptyLines &empty_lines, Printer &printer);
|
||||
|
||||
} // namespace printers
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue