tree-sitter / tree-sitter/tree-sitter-cpp
Method with trailing semi colon
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 453
- Forks
- 185
- PR merge metrics
- No merged PRs in 30d
Description
This code will parse without error:
class Test
{
char *name() { return ""; }
};
However this code generates a parse error:
class Test
{
char *name() { return ""; };
};
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce both C++ snippets with the parser and compare their results. Then inspect the C++ grammar rules for class member declarations and use the reported trailing-semicolon case as the completion check: both snippets should parse without error.
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
- 45/100