Commit d5f8600
authored
Add missing tokens to SPARQL lexer (#1559)
@belett noticed that VALUES was missing [1]; I found the other ones by
running the following snippet on the SPARQL 1.1 Query Language spec:
new Set(Array.from(document.querySelectorAll('.grammarTable'))
.reduce((text, elem) => text + elem.textContent)
.match(/'[a-z0-9-_ ]*'/ig))
I don’t know why a few keywords were missing; the docstring linked to
the SPARQL 1.0 Query Language spec (also fixed here), but the lexer
already contained other tokens which were only added in SPARQL 1.1, such
as the aggregate functions (MIN, MAX etc.), which have already been in
Pygments since the initial commit of the current history (6ded9db).
[1]: https://phabricator.wikimedia.org/T2641751 parent a886f74 commit d5f8600
1 file changed
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
103 | | - | |
| 102 | + | |
| 103 | + | |
104 | 104 | | |
105 | | - | |
| 105 | + | |
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
120 | | - | |
| 120 | + | |
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| |||
0 commit comments