RainwayApp / node-clangffi

Generate Typescript FFI bindings for C/C++ libraries using libclang and ffi-napi.
MIT License
7 stars 1 forks source link

feat(selectors): Refactor to use selectors #33

Closed bengreenier closed 2 years ago

bengreenier commented 2 years ago

Selectors allow the caller to identify a symbol (or set of symbols) using basic pattern matching. The spec for a selector is as follows:

<symbolTitle>[:<symbolChild>] or <symbolTitle>[:{<symbolChild>, ...}]

Where symbolTitle is:

[*A-Za-z0-9_\-]+

Where symbolChild is:

[*A-Za-z0-9_\- ]+

For example, here are some valid selectors:

MyType
MyType:MyParam
MyType:*Param
MyType:{MyParam1, MyParam2}

And some invalid selectors:

Fn1:param1, Fn2:param2
Fn1:{param1
Fn1:param1, param2
Fn1:param1}

See the tests for more info.

As a result, this change has several breaking changes as we've refactored the cli options: