ladybird/Meta
Sam Atkins b645e26e9b LibWeb/CSS: Bring TokenStream in line with spec
When the TokenStream code was originally written, there was no such
concept in the CSS Syntax spec. But since then, it's been officially
added, (https://drafts.csswg.org/css-syntax/#css-token-stream) and the
parsing algorithms are described in terms of it. This patch brings our
implementation in line with the spec. A few deprecated TokenStream
methods are left around until their users are also updated to match the
newer spec.

There are a few differences:

- They name things differently. The main confusing one is we had
  `next_token()` which consumed a token and returned it, but the spec
  has a `next_token()` which peeks the next token. The spec names are
  honestly better than what I'd come up with. (`discard_a_token()` is a
  nice addition too!)

- We used to store the index of the token that was just consumed, and
  they instead store the index of the token that will be consumed next.
  This is a perfect breeding ground for off-by-one errors, so I've
  finally added a test suite for TokenStream itself.

- We use a transaction system for rewinding, and the spec uses a stack
  of "marks", which can be manually rewound to. These should be able to
  coexist as long as we stick with marks in the parser spec algorithms,
  and stick with transactions elsewhere.
2024-10-09 17:29:29 +01:00
..
CMake LibMedia+Ladybird: Use pkg_check_modules to find pulseaudio 2024-10-02 20:23:03 -04:00
gn Meta: Port changes to gn build 2024-10-09 06:43:31 -04:00
Lagom LibWeb/CSS: Bring TokenStream in line with spec 2024-10-09 17:29:29 +01:00
check-debug-flags.sh Meta: Make check-debug-flags.sh runnable in Bash 3.2 2024-07-16 09:13:14 -06:00
check-idl-files.py Meta: Add script for checking WebIDL files 2024-09-10 21:16:53 +01:00
check-markdown.sh Everywhere: Replace SERENITY_SOURCE_DIR with LADYBIRD_SOURCE_DIR 2024-06-03 15:57:59 +02:00
check-newlines-at-eof.py Meta: Check more file extensions for newlines at EOF 2024-09-09 22:34:52 -06:00
check-png-sizes.sh Meta: Add a PNG size check to CI and pre-commit checks 2022-06-18 21:58:43 +04:30
check-style.py Everywhere: Remove a lot more things we don't need 2024-06-03 10:53:53 +02:00
configure-clangd.sh Meta: Script to configure clangd according to build type 2024-08-05 23:44:03 -06:00
debug.plist CMake: Add a command for codesigning with the get-task-allow entitlement 2024-07-02 16:57:51 -06:00
embed_as_string.py Meta: Make embed_as_string_view.py produce Strings instead 2024-09-03 10:12:07 +01:00
find_compiler.sh Meta: Fix detection of default compiler versions 2024-05-23 00:56:37 -06:00
generate-libwasm-spec-test.py LibWasm: Ignore tests that check that we don't support 2+ memories 2024-07-14 11:26:52 +02:00
generate-libwasm-spec-test.sh Meta: Run the Wasm spec tests in CI 2021-05-27 17:28:41 +04:30
generate_clang_module_map.py Meta+Libraries+AK: Append Cxx to imported library module names in swift 2024-08-27 17:22:31 -06:00
ladybird.sh Meta: Use a common function for getting build directory 2024-10-09 11:31:51 +01:00
lint-ci.sh Meta: Add swift-format linter script 2024-10-01 13:33:05 -06:00
lint-clang-format.sh Meta: Make all pre-commit CI scripts work with Bash 3.2 2024-07-16 08:56:22 -06:00
lint-commit.sh CI: Add a check to report git merge commit 2022-12-10 12:07:06 +00:00
lint-executable-resources.sh Meta: Remove SerenityOS components not needed for Ladybird 2024-06-03 10:53:53 +02:00
lint-gn.sh Meta: Make all pre-commit CI scripts work with Bash 3.2 2024-07-16 08:56:22 -06:00
lint-prettier.sh Meta: Make all pre-commit CI scripts work with Bash 3.2 2024-07-16 08:56:22 -06:00
lint-python.sh Meta: Make all pre-commit CI scripts work with Bash 3.2 2024-07-16 08:56:22 -06:00
lint-shell-scripts.sh Meta: Make all pre-commit CI scripts work with Bash 3.2 2024-07-16 08:56:22 -06:00
lint-swift.sh Meta: Add swift-format linter script 2024-10-01 13:33:05 -06:00
refresh-ladybird-qtcreator.sh Documentation: Update instruction for building with QtCreator 2024-06-03 13:19:00 -06:00
shell_include.sh Meta: Use a common function for getting build directory 2024-10-09 11:31:51 +01:00
WPT.sh Meta: Use a common function for getting build directory 2024-10-09 11:31:51 +01:00