Commit graph

136 commits

Author SHA1 Message Date
Alexandre Julliard 78dc4ce7a0 widl: Pass the correct parent name when opening an import file.
Fixed a regression from 9d537999e3.
2023-03-20 17:10:45 +01:00
Rémi Bernon d359837fcc widl: Avoid freeing input_name in pop_import.
The pointers are used in loc_info input_name without copy.
2023-03-17 16:45:29 +01:00
Rémi Bernon 194c002c6e widl: Simplify string literals lexing. 2023-03-17 16:45:11 +01:00
Rémi Bernon baa3680f2e widl: Introduce a new helper to produce num tokens. 2023-03-17 16:45:11 +01:00
Rémi Bernon a46facfd8c widl: Group <ATTR> tokens together. 2023-03-17 16:45:11 +01:00
Rémi Bernon 832d6985c8 widl: Group <INITIAL> tokens together. 2023-03-17 16:45:11 +01:00
Rémi Bernon 2b3a910184 widl: Group <INITIAL,ATTR> tokens together. 2023-03-17 16:45:11 +01:00
Rémi Bernon 39da052012 widl: Introduce new (open|close)_input_file helpers. 2023-03-16 14:09:25 +01:00
Rémi Bernon 9d537999e3 widl: Use a struct list for the import stack. 2023-03-16 14:09:25 +01:00
Rémi Bernon 5deda2de3f widl: Simplify handling of already parsed imports. 2023-03-16 14:09:25 +01:00
Rémi Bernon 9d1f1a3fb1 widl: Use a struct list to keep imported files. 2023-03-16 14:09:25 +01:00
Rémi Bernon b97cf7ab5f widl: Remove unused temp_name member. 2023-03-14 20:38:59 +01:00
Rémi Bernon 9a047736b3 widl: Use bison-bridge option. 2023-03-14 20:38:59 +01:00
Rémi Bernon 37f343b4a9 widl: Use noyywrap lexer option. 2023-03-14 20:38:59 +01:00
Alexandre Julliard ca398e2762 tools: Add a common helper to cleanup temp files. 2023-01-25 11:47:51 +01:00
Bernhard Kölbl 64d5feb4ce widl: Add support for the [overload] attribute.
The attribute is used by WinRT and doesn't have any
effect on the generated headers.

Signed-off-by: Bernhard Kölbl <besentv@gmail.com>
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-25 20:50:49 +01:00
Huw Davies f8adbf35ca widl: Remove the uuid_t typedef which causes conflicts on macOS.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-25 09:27:15 +01:00
Alexandre Julliard a7f0e61e6c widl: Avoid using Windows types where possible.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-24 12:27:47 +01:00
Alexandre Julliard 13ec7952e0 configure: Assume that unistd.h is available on Unix.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-09 18:43:51 +01:00
Alexandre Julliard 8d6c33c3bf include: Remove wine/port.h.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-01 18:13:54 +01:00
Alexandre Julliard 55701c6672 tools: Add a helper function to create temp files.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-29 21:38:11 +02:00
Alexandre Julliard b69ce3472d wpp: Move the preprocessor code into wrc.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-24 21:55:18 +02:00
Rémi Bernon 2326d7226d widl: Support WinRT delegate type.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Jacek Caban<jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-18 22:39:33 +01:00
Rémi Bernon d3c7aa2915 widl: Support WinRT parameterized interface type.
This allows parameterized interfaces to be instanciated in declare
blocks, in the same way MIDL does, generating a new interface to the
header from the parameterized type template, replacing its parameters
with the given types.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-17 22:21:06 +01:00
Andrew Boyarshin a55a37d1da widl: Support midl_pragma default option.
Signed-off-by: Andrew Boyarshin <andrew.boyarshin@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-16 23:01:38 +01:00
Rémi Bernon daba929a52 widl: Support WinRT requires keyword.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-09 21:16:16 +01:00
Rémi Bernon 1442ddf942 widl: Support WinRT static attribute parsing.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-09 21:16:14 +01:00
Rémi Bernon 30129c2837 widl: Support WinRT activatable attribute parsing.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-09 21:16:11 +01:00
Rémi Bernon 374321f836 widl: Remove aNAMESPACE token from the lexer.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-08 20:09:15 +01:00
Rémi Bernon 8233b3d537 widl: Support WinRT eventadd/eventremove attributes.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-01 10:50:17 +01:00
Rémi Bernon 1a62712e25 widl: Support WinRT flags attribute parsing.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-01 10:50:12 +01:00
Rémi Bernon f46c077d5e widl: Support WinRT runtimeclass type parsing.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-28 09:41:46 +01:00
Rémi Bernon 73e0f5e212 widl: Support WinRT exclusiveto attribute parsing.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-26 19:26:22 +01:00
Rémi Bernon 1abdd8c89a widl: Support WinRT mta threading attribute parsing.
As an alias to free-threaded model.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-26 19:26:19 +01:00
Rémi Bernon 2129e335f2 widl: Support WinRT marshaling_behavior attribute parsing.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-25 21:04:04 +01:00
Rémi Bernon 54035a2101 widl: Support WinRT contract attribute.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-01 19:50:04 +01:00
Rémi Bernon ee490ee26c widl: Support WinRT apicontract type.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-01 19:49:52 +01:00
Rémi Bernon 19b5f3e060 widl: Support WinRT contractversion attribute parsing.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-01 19:49:49 +01:00
Kevin Puetz 7afd550f34 widl: Parse attribute custom(guid,expr).
Signed-off-by: Kevin Puetz <PuetzKevinA@JohnDeere.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-18 22:27:51 +01:00
Rémi Bernon a154a42c0d widl: Restrict some keywords to WinRT mode only.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-16 21:06:18 +01:00
Eric Kohl ba72ef6c22 widl: Add the [allocate] acf attribute.
Signed-off-by: Eric Kohl <eric.kohl@reactos.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-27 21:04:46 +01:00
Rémi Bernon 280932536f widl: Support fully qualified names in WinRT mode.
Interfaces are going to reference each other across namespaces, so this
implements a type lookup with the full name.

It supports the following idl syntax in WinRT mode:

    #ifdef __WIDL__
    #pragma winrt ns_prefix
    #endif

    import "wtypes.idl";

    namespace Windows {
        namespace Foo {
            [object]
            interface IFoo {}
        }
        namespace Bar {
            [object]
            interface IBar { HRESULT DoBar([in] Windows.Foo.IFoo *foo); }
        }
    }

That was previously failing to parse the Windows.Foo.IFoo part and to
lookup the corresponding type.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-07 21:07:00 +02:00
Jacek Caban d6b76df314 widl: Preprocess and attempt to parse provided ACF file.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-09 21:08:09 +01:00
Jacek Caban 2761fc91d0 widl: Add __int32 type support.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-01 21:50:57 +01:00
Józef Kucia 1d0ba302d9 widl: Reformat do_import().
Use 4-space indents.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-29 19:29:30 +01:00
Józef Kucia ba6b020b9f widl: Increase max import depth.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-29 19:28:36 +01:00
Sergei Bolotov 376daa91d8 widl: Support for toggling and checking status for warnings, support for warning 2368.
Signed-off-by: Sergei Bolotov <bolotov.s.s@yandex.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-12 12:54:09 +09:00
Sergei Bolotov 646dfe746d widl: Handle "midl_pragma warning" statement in parser.
Signed-off-by: Sergei Bolotov <bolotov.s.s@yandex.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-12 12:27:17 +09:00
Jacek Caban 21740b5e15 widl: Added support for -ns_prefix option. 2015-08-05 23:42:45 +09:00
Jacek Caban a9503166fe widl: Added widl-specific winrt pragma. 2015-08-03 20:50:33 +02:00