Discover and parse multiple files in Rust.
lang
specifies the language.
config
specifies the file path and matcher.
callback
will receive matching nodes found in a file.
Get the kind
number from its string name.
Parse a string to an ast-grep instance
Parse a string to an ast-grep instance asynchronously in threads.
It utilize multiple CPU cores when concurrent processing sources.
However, spawning excessive many threads may backfire.
Please refer to libuv doc, nodejs’ underlying runtime
for its default behavior and performance tuning tricks.
Compile a string to ast-grep Pattern.