mirror of
https://codeberg.org/ProgramSnail/lang.git
synced 2025-12-10 00:48:45 +00:00
most part of statement printers done
This commit is contained in:
parent
c176d1b11d
commit
0bb72e0b10
7 changed files with 208 additions and 25 deletions
|
|
@ -42,9 +42,9 @@ public:
|
|||
print_spaces(indentation);
|
||||
}
|
||||
|
||||
void indent() { ++current_indentation_level_; }
|
||||
void indent() { current_indentation_level_ += tab_width_; }
|
||||
|
||||
void deindent() { --current_indentation_level_; }
|
||||
void deindent() { current_indentation_level_ -= tab_width_; }
|
||||
|
||||
void tab() { print_spaces(tab_width_); }
|
||||
|
||||
|
|
@ -64,7 +64,15 @@ public:
|
|||
return print_words_instead_of_symbols_;
|
||||
}
|
||||
|
||||
size_t get_current_position() { return current_position_; }
|
||||
size_t get_current_position() const { return current_position_; }
|
||||
|
||||
size_t get_current_indentation_level() const {
|
||||
return current_indentation_level_;
|
||||
}
|
||||
|
||||
size_t set_current_indentation_level(size_t indentation_level) {
|
||||
current_indentation_level_ = indentation_level;
|
||||
}
|
||||
|
||||
private:
|
||||
void end_line() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue