Skip to content

Commit

Permalink
Merge pull request #13 from chrhansk/feature-c-func-parameters
Browse files Browse the repository at this point in the history
Add support for function parameters with names
  • Loading branch information
b0o authored Dec 21, 2024
2 parents 9d3c52e + 0152f4c commit 62f44f5
Show file tree
Hide file tree
Showing 5 changed files with 188,152 additions and 188,093 deletions.
6 changes: 4 additions & 2 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -572,9 +572,11 @@ module.exports = grammar(Python, {

c_parameters: $ => seq("(", optional($._typedargslist), ")"),

// e.g. int (*)(const char, int)
// e.g.
// int (*)(const char, int)
// int (*func)(const char, int)
c_function_argument_type: $ =>
seq($.c_type, "(", "*", ")", $.c_parameters),
seq($.c_type, "(", "*", optional($.identifier), ")", $.c_parameters),

_typedargument: $ =>
seq(
Expand Down
12 changes: 12 additions & 0 deletions src/grammar.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions src/node-types.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 62f44f5

Please sign in to comment.