Skip to content

bug: Parse error when reading function declaration with ms_call_modifier #320

@eezstreet

Description

@eezstreet

Did you check existing issues?

  • I have read all the tree-sitter docs if it relates to using the parser
  • I have searched the existing issues of tree-sitter-cpp

Tree-Sitter CLI Version, if relevant (output of tree-sitter --version)

No response

Describe the bug

Trying to parse function declarations that use Microsoft specific extensions to specify the calling convention (ms_call_modifier) results in an error.

Steps To Reproduce/Bad Parse Tree

Attempt to parse a header file that includes a function declaration with one of the ms_call_modifiers included inline without parenthesis. See below.

Expected Behavior/Parse Tree

It should parse it as a function_declaration, but returns an error.

Repro

size_t __stdcall strlen(const char* pBuffer);

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions