tree-sitter / tree-sitter/tree-sitter-cpp

constexpr macro parsing issue

Open
#87 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
453
Forks
185
PR merge metrics
No merged PRs in 30d

Description

Declaring a constexpr macro works well if the total length of the line is less than 38 chars -
Screen Shot 2020-08-13 at 5 04 42 AM

However, adding one more char to the line containing the macro causes the following class definition to be incorrectly handled.
Screen Shot 2020-08-13 at 5 06 46 AM

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue in the tree-sitter C++ grammar using a constexpr macro below and above the reported 38-character boundary, then inspect how the following class definition is parsed. The work is complete when both line lengths produce the correct class structure and regression coverage prevents the boundary case from returning.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.