Closed jengelh closed 1 year ago
Yes, this fixes that one case, but ideally, you want AC_NEXT_KEYWORDS
to have the ability to specify either which command(s) or language(s) each keyword applies to. For example, by
should be included on the next-keywords list only when the current command being parsed is declare lambda
since that's the only place by
follows reference
. But then it gets even more complicated. I'm not sure it's worth it.
CDECL_KEYWORDS is context-free; there's no data in it about "previous keywords", so AC_NEXT_KEYWORDS can only contain all potential next keywords.
I merged your PR; thanks. But I may add more context in the future.
Ultimate target:
User input:
Result set of Tab Completion:
Expected result set: