Commit fbc0d4c
fix: allow keyword module names in DESCRIBE MODULE
Adding AGENT, AGENTS, KNOWLEDGE, BASES, CONSUMED, MCP as lexer tokens
shadowed module names matching those keywords — e.g. a module literally
called "Agents" could no longer be parsed by DESCRIBE MODULE Agents
because the rule required a bare IDENTIFIER and "Agents" now lexes as
the AGENTS keyword.
Fix: DESCRIBE MODULE now accepts identifierOrKeyword (the same helper
rule qualifiedName uses), which matches both IDENTIFIER and any reserved
keyword. The visitor reads via ctx.IdentifierOrKeyword() with a fallback
to ctx.IDENTIFIER() for safety.
Verified:
- DESCRIBE MODULE Agents now works
- DESCRIBE MODULE Agents WITH ALL now works
- DESCRIBE MODULE WeatherDemo still works (non-keyword module)
- LIST AGENTS IN Agents still works (qualifiedName path was already OK)
Note: LIST MODULES Agents is not supported — LIST MODULES takes no
filter. Users looking at a single module's contents should use
DESCRIBE MODULE <name> WITH ALL or LIST <type> IN <module>.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent be9dc7f commit fbc0d4c
4 files changed
Lines changed: 27 additions & 27 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3038 | 3038 | | |
3039 | 3039 | | |
3040 | 3040 | | |
3041 | | - | |
| 3041 | + | |
3042 | 3042 | | |
3043 | 3043 | | |
3044 | 3044 | | |
| |||
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
668 | 668 | | |
669 | 669 | | |
670 | 670 | | |
671 | | - | |
| 671 | + | |
| 672 | + | |
672 | 673 | | |
673 | 674 | | |
674 | | - | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
675 | 679 | | |
676 | 680 | | |
677 | 681 | | |
| |||
0 commit comments