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

Make the varargs ellipsis a named node

Open
#31 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

No information is provided about the ellipsis in the AST.

extern void eggx_gsetinitialparsegeometry( const char *, ... ) ;

AST is:

(translation_unit 1 1 64
 (declaration 1 1 64
  (storage_class_specifier 1 1 6)
  (primitive_type 1 8 4)
  (function_declarator 1 13 50
   (identifier 1 13 29)
   (parameter_list 1 42 21
    (parameter_declaration 1 44 12
     (type_qualifier 1 44 5)
     (primitive_type 1 50 4)
     (abstract_pointer_declarator 1 55 1)
    )
   )
  )
 )
)

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

Inspect the grammar rule that produces the parameter_list in the shown AST, and trace how the varargs ellipsis in the example declaration is currently handled. Done means the ellipsis appears as its own named AST node for this declaration, with the surrounding AST structure preserved.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.