[PATCH 2/5] widl: Support using qualified names for interfaces.

Rémi Bernon rbernon at codeweavers.com
Wed Feb 3 09:30:39 CST 2021


On 2/3/21 4:22 PM, Jacek Caban wrote:
> On 02.02.2021 09:22, Rémi Bernon wrote:
>> And make qualified name lookup more robust:
>>
>> * Either parse a non-qualified name directly from
>>    the current (or global) namespace, or start
>>    parsing a qualified name.
>>
>> * Qualified name parsing uses the lookup namespace
>>    stack only to find types or sub-namespaces.
> 
> 
> I think it's a step in the right direction, but things like 
> find_qualified_type_or_error() resetting lookup_namespace as a side 
> effect does not look appealing.
> 
> 
> I wonder if we could entirely get rid of global lookup_namespace 
> variable. As far as parser is considered, namespace_pfx could just 
> return a namespace type that we could use to find types. That leaves us 
> with is_type() and is_namespace(), which are used in lexer. I'd say that 
> it's not a job of lexer to distinguish between an identifier and a known 
> type. Maybe we could just get rid of aNAMESPACE and aKNOWNTYPE and deal 
> with that in parser instead?
> 
> 
> Thanks,
> 
> Jacek
> 

It may be better with a bit of refactoring but I was wary of changing 
existing logic too much, especially as this is WinRT only, so I just 
tried to build upon what was already there (with the lookup_namespace 
introduction earlier, and this change now).

I could have a better look I guess.
-- 
Rémi Bernon <rbernon at codeweavers.com>



More information about the wine-devel mailing list