Skip to content

Commit 7ace4cd

Browse files
committed
add rule for module signature names (differing from module names)
1 parent d4ab1c9 commit 7ace4cd

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

docs/codeql/ql-language-reference/ql-language-specification.rst

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ A QL signature definition has the following syntax:
351351

352352
typeSignature ::= qldoc? annotations "signature" "class" upperId ("extends" type ("," type)*)? (";" | "{" signaturePredicate* "}")
353353

354-
moduleSignature ::= qldoc? annotation* "signature" "module" upperId parameters? "{" moduleSignatureBody "}"
354+
moduleSignature ::= qldoc? annotation* "signature" "module" moduleSignatureName parameters? "{" moduleSignatureBody "}"
355355

356356
moduleSignatureBody ::= (signaturePredicate | defaultPredicate | signatureType)*
357357

@@ -632,14 +632,15 @@ Identifiers are used in following syntactic constructs:
632632

633633
::
634634

635-
simpleId ::= lowerId | upperId
636-
modulename ::= simpleId
637-
classname ::= upperId
638-
dbasetype ::= atLowerId
639-
predicateRef ::= (moduleExpr "::")? literalId
640-
predicateName ::= lowerId
641-
varname ::= lowerId
642-
literalId ::= lowerId | atLowerId
635+
simpleId ::= lowerId | upperId
636+
modulename ::= simpleId
637+
moduleSignatureName ::= upperId
638+
classname ::= upperId
639+
dbasetype ::= atLowerId
640+
predicateRef ::= (moduleExpr "::")? literalId
641+
predicateName ::= lowerId
642+
varname ::= lowerId
643+
literalId ::= lowerId | atLowerId
643644

644645
Integer literals (int)
645646
~~~~~~~~~~~~~~~~~~~~~~
@@ -2127,7 +2128,7 @@ The complete grammar for QL is as follows:
21272128

21282129
typeSignature ::= qldoc? annotations "signature" "class" upperId ("extends" type ("," type)*)? (";" | "{" signaturePredicate* "}")
21292130

2130-
moduleSignature ::= qldoc? annotation* "signature" "module" upperId parameters? "{" moduleSignatureBody "}"
2131+
moduleSignature ::= qldoc? annotation* "signature" "module" moduleSignatureName parameters? "{" moduleSignatureBody "}"
21312132

21322133
moduleSignatureBody ::= (signaturePredicate | defaultPredicate | signatureType)*
21332134

@@ -2184,7 +2185,7 @@ The complete grammar for QL is as follows:
21842185

21852186
moduleExpr ::= simpleId arguments? | moduleExpr "::" simpleId arguments?
21862187

2187-
moduleSignatureExpr ::= (moduleExpr "::")? upperId arguments?
2188+
moduleSignatureExpr ::= (moduleExpr "::")? moduleSignatureName arguments?
21882189

21892190
signatureExpr : (moduleExpr "::")? simpleId ("/" Integer | arguments)?;
21902191

@@ -2311,6 +2312,8 @@ The complete grammar for QL is as follows:
23112312

23122313
modulename ::= simpleId
23132314

2315+
moduleSignatureName ::= upperId
2316+
23142317
classname ::= upperId
23152318

23162319
dbasetype ::= atLowerId

0 commit comments

Comments
 (0)