Skip to content

Commit a547e12

Browse files
akoclaude
andcommitted
fix: allow quoted identifiers in CREATE MODULE statement
CREATE MODULE "QuotedName" was a parse error because the grammar used bare IDENTIFIER instead of identifierOrKeyword, unlike every other CREATE command (ODATA CLIENT, ENTITY, MICROFLOW, etc.) which all accept quoted names. DROP MODULE already used qualifiedName so the asymmetry also broke round-trips involving reserved-word module names. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 24574fd commit a547e12

4 files changed

Lines changed: 23 additions & 15 deletions

File tree

mdl/grammar/MDLParser.g4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -814,7 +814,7 @@ alterNotebookAction
814814
// =============================================================================
815815

816816
createModuleStatement
817-
: MODULE IDENTIFIER moduleOptions?
817+
: MODULE identifierOrKeyword moduleOptions?
818818
;
819819

820820
moduleOptions

mdl/grammar/parser/MDLParser.interp

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

mdl/grammar/parser/mdl_parser.go

Lines changed: 19 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mdl/visitor/visitor_module.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import (
99

1010
func (b *Builder) ExitCreateModuleStatement(ctx *parser.CreateModuleStatementContext) {
1111
name := ""
12-
if id := ctx.IDENTIFIER(); id != nil {
13-
name = id.GetText()
12+
if iok := ctx.IdentifierOrKeyword(); iok != nil {
13+
name = identifierOrKeywordText(iok)
1414
}
1515
b.statements = append(b.statements, &ast.CreateModuleStmt{
1616
Name: name,

0 commit comments

Comments
 (0)