Skip to content

Question: How to get multiple matches into one capture? #2539

Closed Answered by ahlinc
kothavade asked this question in Q&A
Discussion options

You must be logged in to vote

Fix the query like the next:

(function_definition
    type: (_) @return_type
    declarator: (function_declarator
        declarator: (identifier) @function_name
        parameters: (parameter_list
            (
                (parameter_declaration
                    type: _ @parameter_type
                )
                ","?
            )*
        )
    )
)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@kothavade
Comment options

Answer selected by kothavade
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #2536 on August 19, 2023 23:44.