1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 02:27:43 +00:00

Shell: Respect input sources' blank lines between sequences

But collapse them to a single empty line.
This makes the generated sources look significantly better.
This commit is contained in:
AnotherTest 2020-10-14 18:25:11 +03:30 committed by Andreas Kling
parent cd48ec2abd
commit 738f512919
2 changed files with 95 additions and 0 deletions

View file

@ -92,6 +92,8 @@ private:
virtual void visit(const AST::WriteRedirection*) override;
void test_and_update_output_cursor(const AST::Node*);
void visited(const AST::Node*);
void will_visit(const AST::Node*);
void insert_separator();
void insert_indent();
@ -118,6 +120,7 @@ private:
AST::Node* m_hit_node { nullptr };
const AST::Node* m_parent_node { nullptr };
const AST::Node* m_last_visited_node { nullptr };
StringView m_trivia;
};