1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-15 07:24:58 +00:00

LibGUI: Update ShellSyntaxHighlighter to also highlight brace expansions

This commit is contained in:
AnotherTest 2020-10-24 18:17:42 +03:30 committed by Andreas Kling
parent 5640e1bc3a
commit 107a083b5a

View file

@ -140,6 +140,10 @@ private:
span.color = m_palette.syntax_punctuation();
span.font = &Gfx::Font::default_bold_fixed_width_font();
}
virtual void visit(const AST::BraceExpansion* node) override
{
NodeVisitor::visit(node);
}
virtual void visit(const AST::BarewordLiteral* node) override
{
NodeVisitor::visit(node);
@ -350,6 +354,15 @@ private:
{
NodeVisitor::visit(node);
}
virtual void visit(const AST::Range* node) override
{
NodeVisitor::visit(node);
auto& span = span_for_node(node->start());
span.range.set_start(span.range.end());
set_offset_range_end(span.range, node->start()->position().end_line, 2);
span.color = m_palette.syntax_punctuation();
}
virtual void visit(const AST::ReadRedirection* node) override
{
NodeVisitor::visit(node);