Skip to content

[Bug] Parser breaks on declares by ordinal #19

@sancarn

Description

@sancarn

Describe the bug

Parser breaks on declares by ordinal:

Private Declare PtrSafe Function IUnknown_GetWindow Lib "shlwapi" Alias "#172" (ByVal pIUnk As IUnknown, ByVal hwnd As LongPtr) As Long

Should be a simple fix, currently antlr grammar is as follows:

aliasClause: ALIAS wsc STRINGLITERAL;

Needs changing to

aliasClause: ALIAS wsc stringOrOrdinal;
stringOrOrdinal
     : STRINGLITERAL
    | ORDINALSTRING
    ;
ORDINALSTRING
    : '"#' [0-9]+ '"'
    ;

I can likely PR, but just not sure how to build/test... Any instructions? 😅

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions