Skip to content

Commit

Permalink
Add support for function parameters with names
Browse files Browse the repository at this point in the history
  • Loading branch information
chrhansk committed Dec 21, 2024
1 parent 9d3c52e commit 437e206
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),

Check failure on line 579 in grammar.js

View workflow job for this annotation

GitHub Actions / lint

Multiple spaces found before '")"'

_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 437e206

Please sign in to comment.