Add new 'let' command to bind arbitrary values into constants.
These constants can then be used in the matcher expressions.
Details
Diff Detail
Event Timeline
clang-query/Query.cpp | ||
---|---|---|
131 | Is this path reachable? If not, we should either remove it or come up with a command syntax for erasing named values. | |
clang-query/QueryParser.cpp | ||
144 | Can you keep these in alphabetical order, please? | |
194 | Ditto. | |
clang-query/tool/ClangQuery.cpp | ||
122–124 | You could pass in a lambda here instead. |
Added unlet command. Minor fixes.
clang-query/Query.cpp | ||
---|---|---|
131 | It was not reachable. | |
clang-query/QueryParser.cpp | ||
144 | Done. | |
194 | Done. | |
clang-query/tool/ClangQuery.cpp | ||
122–124 | My bad. I assumed it needed a function pointer. |
clang-query/Query.h | ||
---|---|---|
35 | Sorry, missed this one -- alphabetical order, please. | |
clang-query/QueryParser.cpp | ||
71 | You could factor this code out into a completeWord function. | |
264 | It would be nice to support completion for value names here. | |
270 | Can you please use 'endQuery' here so that extra input causes an error? |
Minor fixes
clang-query/Query.h | ||
---|---|---|
35 | Done. | |
clang-query/QueryParser.cpp | ||
71 | How would it help with this change? | |
264 | Yes. | |
270 | Done. |
clang-query/Query.cpp | ||
---|---|---|
131 | Sorry, one thing I forgot to mention before: is this the correct behavior if the value does not exist in the map? Should we be printing an error message in that case? | |
clang-query/QueryParser.cpp | ||
71 | I meant that it could help with implementing completion, but if you want to do that separately, that's fine. | |
264 | OK, sounds good. | |
unittests/clang-query/QueryParserTest.cpp | ||
123 | Please also test that extra stuff after the unlet query causes an error. |
unittests/clang-query/QueryEngineTest.cpp | ||
---|---|---|
139 | Can you please move this test to QueryParserTest? |
Sorry, missed this one -- alphabetical order, please.