mirror of
https://codeberg.org/ProgramSnail/lang.git
synced 2025-12-17 04:18:43 +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
|
|
@ -124,17 +124,24 @@ private:
|
|||
size_t indentation_level_ = 0;
|
||||
};
|
||||
|
||||
void print_modifier(const nodes::Modifier &modifier, Printer &printer,
|
||||
bool const_is_none = false);
|
||||
void print(const nodes::Modifier &modifier, Printer &printer,
|
||||
bool const_is_none = false);
|
||||
|
||||
void print_literal(const nodes::Literal &literal, Printer &printer);
|
||||
void print(const nodes::Literal &literal, Printer &printer);
|
||||
|
||||
void print_identifier(const nodes::Identifier &identifier, Printer &printer);
|
||||
void print(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(const nodes::Extra &extra, Printer &printer);
|
||||
|
||||
void print_empty_lines(const nodes::EmptyLines &empty_lines, Printer &printer);
|
||||
void print(const nodes::EmptyLines &empty_lines, Printer &printer);
|
||||
|
||||
template <typename T>
|
||||
inline void print(const std::vector<T> &nodes, Printer &printer) {
|
||||
for (const auto &node : nodes) {
|
||||
print(node, printer);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace printers
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue