You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To prepare for a future QL language change where variable names must
start with a lower-case letter, this commit updates the QL language
reference (including the language specification) to change the variable
name grammar from `simpleId` to `lowerId`.
Copy file name to clipboardExpand all lines: docs/codeql/ql-language-reference/ql-language-specification.rst
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -364,7 +364,7 @@ A *variable declaration list* provides a sequence of variables and a type for ea
364
364
::
365
365
366
366
var_decls ::= (var_decl ("," var_decl)*)?
367
-
var_decl ::= type simpleId
367
+
var_decl ::= type lowerId
368
368
369
369
A valid variable declaration list must not include two declarations with the same variable name. Moreover, if the declaration has a typing environment that applies, it must not use a variable name that is already present in that typing environment.
370
370
@@ -585,7 +585,7 @@ Identifiers are used in following syntactic constructs:
585
585
dbasetype ::= atLowerId
586
586
predicateRef ::= (moduleId "::")? literalId
587
587
predicateName ::= lowerId
588
-
varname ::= simpleId
588
+
varname ::= lowerId
589
589
literalId ::= lowerId | atLowerId
590
590
591
591
Integer literals (int)
@@ -948,7 +948,7 @@ The ``select`` keyword is followed by a number of *select expressions*. Select e
948
948
::
949
949
950
950
as_exprs ::= as_expr ("," as_expr)*
951
-
as_expr ::= expr ("as" simpleId)?
951
+
as_expr ::= expr ("as" lowerId)?
952
952
953
953
The keyword ``as`` gives a *label* to the select expression it is part of. No two select expressions may have the same label. No expression label may be the same as one of the variables of the select clause.
954
954
@@ -957,7 +957,7 @@ The ``order`` keyword, if present, is followed by a number of *ordering directiv
957
957
::
958
958
959
959
orderbys ::= orderby ("," orderby)*
960
-
orderby ::= simpleId ("asc" | "desc")?
960
+
orderby ::= lowerId ("asc" | "desc")?
961
961
962
962
Each identifier in an ordering directive must identify exactly one of the select expressions. It must either be the label of the expression, or it must be a variable expression that is equivalent to exactly one of the select expressions. The type of the designated select expression must be a subtype of a primitive type.
963
963
@@ -2042,11 +2042,11 @@ The complete grammar for QL is as follows:
2042
2042
2043
2043
as_exprs ::= as_expr ("," as_expr)*
2044
2044
2045
-
as_expr ::= expr ("as" simpleId)?
2045
+
as_expr ::= expr ("as" lowerId)?
2046
2046
2047
2047
orderbys ::= orderby ("," orderby)*
2048
2048
2049
-
orderby ::= simpleId ("asc" | "desc")?
2049
+
orderby ::= lowerId ("asc" | "desc")?
2050
2050
2051
2051
predicate ::= qldoc? annotations head optbody
2052
2052
@@ -2095,7 +2095,7 @@ The complete grammar for QL is as follows:
2095
2095
2096
2096
var_decls ::= (var_decl ("," var_decl)*)?
2097
2097
2098
-
var_decl ::= type simpleId
2098
+
var_decl ::= type lowerId
2099
2099
2100
2100
formula ::= fparen
2101
2101
| disjunction
@@ -2216,6 +2216,6 @@ The complete grammar for QL is as follows:
0 commit comments