Commit Graph

13 Commits

Author SHA1 Message Date
Andrew Kaster
7077e4d002 LibIDL+LibWeb: Add support for WebIDL setlike declarations on interfaces 2024-05-23 10:57:34 +02:00
Luke Wilde
316814988f LibIDL+LibWeb: Add support for static readonly attributes
Support for settable attributes is a FIXME.
2024-04-03 07:55:51 +02:00
Tim Ledbetter
9eaae99da7 LibIDL: Ignore leading underscores in IDL identifier names
According to the WebIDL specification, any leading underscores in
identifier names are ignored. A leading underscore is used when an
identifier would otherwise be a reserved word.
2024-03-12 09:31:41 +01:00
Ali Mohammad Pur
971e466521 LibIDL: Emit an error when two decls of the same function are present
Duplicates can show up when copy-pasting IDL snippets into existing IDL
files, and the resulting error is extremely useless and misleading.
This commit makes it so the parser catches these cases, and emits a more
helpful error like "Overload set 'instantiate' contains multiple
identical declarations".
2024-02-16 15:26:43 +01:00
Ali Mohammad Pur
5e1499d104 Everywhere: Rename {Deprecated => Byte}String
This commit un-deprecates DeprecatedString, and repurposes it as a byte
string.
As the null state has already been removed, there are no other
particularly hairy blockers in repurposing this type as a byte string
(what it _really_ is).

This commit is auto-generated:
  $ xs=$(ack -l \bDeprecatedString\b\|deprecated_string AK Userland \
    Meta Ports Ladybird Tests Kernel)
  $ perl -pie 's/\bDeprecatedString\b/ByteString/g;
    s/deprecated_string/byte_string/g' $xs
  $ clang-format --style=file -i \
    $(git diff --name-only | grep \.cpp\|\.h)
  $ gn format $(git ls-files '*.gn' '*.gni')
2023-12-17 18:25:10 +03:30
stelar7
19bf42a7e6 LibIDL: Attach extended attributes on enums 2023-11-07 11:34:21 +01:00
Srikavin Ramkumar
6bc6ea8e97 LibIDL: Parse extended attributes for constructors 2023-03-23 13:37:40 +01:00
Timothy Flynn
61ecdbca54 LibIDL: Begin parsing IDL namespaces
For example, the CSS namespace is defined via IDL, but we currently have
a manual implementation.
2023-03-15 12:48:25 -04:00
Andreas Kling
f11899f885 LibWeb+LibIDL: Fix (or paper over) various const-correctness issues
There's definitely stuff to iterate on here, but this takes care of
making the libraries compile with stricter RP and NNRP.
2023-02-21 00:54:04 +01:00
Daniel Bertalan
24d2c90a28 BindingsGenerator+CMake: Keep track of IDL dependencies
This commit teaches BindingsGenerator to generate depfiles, which can be
used by CMake to ensure that bindings are properly regenerated when
imported IDL files change.

Two new options, `--depfile` and `--depfile-target` are added.
- `--depfile` sets the path for the dependency file.
- `--depfile-target` lets us set a target name different than the output
  file in the depfile. This option is needed because generated files are
  first written to a temporary file, but depfiles have to refer to the
  final location.
These are analogous to GCC's `-MF` and `-MT` options respectively. The
depfile's syntax matches the ones generated by GCC.

Note: This changes the minimal required CMake version to 3.20 if the
Make generator is used, and to 3.21 for the Xcode generator. Ninja is
not affected.
2022-12-13 11:31:24 +01:00
Linus Groh
6e19ab2bbc AK+Everywhere: Rename String to DeprecatedString
We have a new, improved string type coming up in AK (OOM aware, no null
state), and while it's going to use UTF-8, the name UTF8String is a
mouthful - so let's free up the String name by renaming the existing
class.
Making the old one have an annoying name will hopefully also help with
quick adoption :^)
2022-12-06 08:54:33 +01:00
Andrew Kaster
067a53b7e7 LibIDL: Remove static maps for interfaces and resolved imports
Instead, create a tree of Parsers all pointing to a top-level Parser.

All module imports and interfaces are stored at the top level, instead
of in a static map. This allows creating multiple IDL::Parsers in the
same process without them stepping on each others toes.
2022-10-09 10:14:57 +02:00
Sam Atkins
c4668053d1 LibIDL+WrapperGenerator: Move IDL code into a library
IDL function overload resolution requires knowing each IDL function's
parameters and their types at runtime. The simplest way to do that is
just to make the types the generator uses available to the runtime.

Parsing has moved to LibIDL, but code generation has not, since that is
very specific to WrapperGenerator.
2022-09-17 21:27:17 +02:00