mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-12 02:30:30 +09:00
LibGUI: Update ShellSyntaxHighlighter to also highlight brace expansions
This commit is contained in:
parent
5640e1bc3a
commit
107a083b5a
Notes:
sideshowbarker
2024-07-19 01:46:12 +09:00
Author: https://github.com/alimpfard
Commit: 107a083b5a
Pull-request: https://github.com/SerenityOS/serenity/pull/3835
Issue: https://github.com/SerenityOS/serenity/issues/3832
Reviewed-by: https://github.com/bugaevc
Reviewed-by: https://github.com/linusg
1 changed files with 13 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue