This is Abstract Operation is required for the majority of
InstantConstructor's and InstantPrototype's methods.
The implementation is not entirely complete, (specifically 2 of the
underlying required abstract operations, ParseTemporalTimeZoneString
and ParseISODateTime are missing the required lexing, and as such are
TODO()-ed) but the majority of it is done.
This is an AK::GenericLexer that exposes helper methods for parsing
date and time related literals (years, months, days, hours, minutes,
seconds, fractional seconds & more)
Perform signed integer shifts, addition, subtraction, and rotations
using their corresponding unsigned type. Additionally, mod the right
hand side of shifts and rotations by the bit width of the integer per
the spec. This seems strange, but the spec is clear on the desired
wrapping behavior of arithmetic operations.
macOS's C library is not a good neighbor and doesn't ensure that
the entry in struct hostent's h_addr_list are aligned properly for
a char const*. In Socket::connect, use ByteReader instead of a c-style
cast to work around this possible misalignment.
Before this change, parent widgets such as Buttons or Labels
were stealing drop events their parents.
I noticed it during drag-n-dropping files into visualization widgets
in Sound Player (which takes practically the entire application size
and gave impression that drop events weren't supported in the app
at all).
The IPCCompiler was using GENERATE_DEBUG_CODE, which was missing from
AK/Debug.h.in, and plain old DEBUG. Let's just use the one that
was already in the debug header, but unused.
Context menu entries like evaluate expression and
move execution to line action should only be enabled
when a debug session is running. Otherwise they should
be disabled.
This commit disables the run button while we
are in debug mode. Otherwise the stop button
gets disabled when we run the program while
we are in debug mode. This would prevent us
from exiting the debug mode.
Calling is_valid_escape_sequence() with no arguments hides what it
is operating on, so I have removed that, so that you must explicitly
tell it what you are testing.
The call from consume_a_token() was using the wrong tokens, so it
returned false incorrectly. This was resulting in corrupted output
when faced with this code from Acid2. (Abbreviated)
```css
.parser { error: \}; }
.parser { }
```
Had to adjust some places that were using Token.to_string() for
non-debug-logging purposes. Changed its name to to_debug_string()
to make the usage clearer.
Whitespace marks the end of a compound-selector, no matter where
it occurs. `check_for_eof_or_whitespace()` reconsumes the whitespace
token for convenience.
The entry points for CSS parsing in the spec are defined as accepting
any of a stream of Tokens, or a stream of ComponentValues, or a String.
TokenStream is an attempt to reduce the duplication of code for that.
The end goal here is to make the two classes mostly interchangeable, as
the CSS spec requires that the various parser algorithms can take a
stream of either class, and we want to have that functionality without
needing to duplicate all of the code.