Commit graph

7 commits

Author SHA1 Message Date
AnotherTest
5e5eb615ec Shell: Add runtime errors and implement break/continue
Such errors are raised when SyntaxError nodes are executed, and are also
used for internal control flow.
The 'break' and 'continue' commands are currently only allowed inside
for loops, and outside function bodies.

This also adds a 'loop' keyword for infinite loops.
2020-12-29 16:55:43 +01:00
Andreas Kling
a35693915e LibGUI: Make syntax highlighter communicate boldness instead of font
Now that fonts know their own weight, we no longer need highlighters to
tell us which font to use. Instead, they can just say "this should be
bold" and we'll find the right font ourselves.
2020-12-28 15:53:10 +01:00
AnotherTest
107a083b5a LibGUI: Update ShellSyntaxHighlighter to also highlight brace expansions 2020-10-25 10:09:27 +01:00
Andreas Kling
1d96ecf148 Everywhere: Add missing <AK/TemporaryChange.h> includes
Don't rely on HashTable.h pulling this in.
2020-10-15 23:49:53 +02:00
AnotherTest
9545ed1c21 LibGUI: Fix wrong Sequence highlight range in ShellSyntaxHighlighter
This fixes the wrong highlight behaviour when a newline is used as
sequence separator:
```sh
echo foo
if foo {}
^ This character would previously be bold
```
2020-10-14 21:05:39 +02:00
AnotherTest
f164b808b5 Shell: Move everything to the Shell namespace
Also provide a basic default-constructor.
2020-10-04 23:12:28 +02:00
AnotherTest
72b68221cc LibGUI: Add a Shell syntax highlighter 2020-09-30 20:05:24 +02:00