dart-lang / dart-lang/native

Handle remaining cases when parsing function parameter names.

Open
#479 0 comments 0 reactions 0 assignees View on GitHub
package:ffigen
Dominant language
Dart
Stars
275
Forks
144
Avg merge
2d 10h
Merged PRs (30d)
47

Description

dart-lang/ffigen#537 Adds function parameter names for many frequently used cases, that should close dart-lang/native#487:

* struct fields of function pointer types
* typedefs of function pointer types
* function parameters of function pointer type

However, I haven't yet been able to investigate some of the cases.

* Function pointer whose return type is a non-typedef'd function pointer. It's a clumsy syntax which I hope no one would write. However we should be handle that gracefully. (My implementation drops the parameter names when there's more `ParmDecl`s than `FuncType` has, and it drops all param names when an empty spelling is encountered. This ensures all parameter names are dropped when such a declaration is encountered. But a proper fix will include inspecting the AST of such cases and modifying `function_type_param_parser.dart` around that).

* constant arrays.

* Maybe more, particularly top level declarations.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.