Commit c955a0f
authored
[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.1 parent 6597cc2 commit c955a0f
1 file changed
+0
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | 63 | | |
70 | | - | |
71 | 64 | | |
72 | 65 | | |
73 | 66 | | |
| |||
0 commit comments