
The clang-query tool has the ability to execute or pre-load queries from a file when the tool is launched, but doesn't have the ability to do the same from the interactive REPL prompt. Because the prompt also doesn't seem to allow multi-line matchers, this can make prototyping and iterating on more complicated matchers difficult. Supporting a dynamic load at REPL time allows the cost of reading the compilation database and building the AST to be imposed just once, and allows faster prototyping.
5 lines
95 B
Plaintext
5 lines
95 B
Plaintext
set bind-root false
|
|
|
|
l func functionDecl(hasName("bar"))
|
|
m func.bind("f")
|
|
m varDecl().bind("v") |