mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 10:48:41 +00:00
LibGUI: Update ShellSyntaxHighlighter to also highlight brace expansions
This commit is contained in:
committed by
Andreas Kling
parent
5640e1bc3a
commit
107a083b5a
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user