Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[spaqrl mode] Fix parsing of veriables after operators
Question-mark characters should only be styled as operators within triple patterns. For example the command SELECT * WHERE { BIND(?A+?B AS ?C) } should not have the "+?" sequence styled as "operator". NB the problem does not occur if there is a space between these two characters. With the fix "?A" and "?B" will both be styled as variable-2 (and "+" as operator). By processing operators characters (mostly) one at a time, the existing code on line 40 to zealously interpret anything beginning with '?' as a variable can run in this case. NB Line 40 actually causes a false positive in the case where the '?' appears in a triple pattern as a property path operator: this fix does not address this existing bug: it is quite complicated as '?' can appear in both variables and property paths while the parser is in the "pattern" state.
- Loading branch information