Add missing tokens to SPARQL lexer#1559
Merged
Anteru merged 1 commit intopygments:masterfrom Oct 2, 2020
Merged
Conversation
@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/T264175
Collaborator
|
Merged, thanks! No idea what went wrong originally, that was before my time. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@belett noticed that VALUES was missing; I found the other ones by running the following snippet on the SPARQL 1.1 Query Language spec:
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,MAXetc.), which have already been in Pygments since the initial commit of the current history (6ded9db).