stardog-union / stardog-language-servers

Language Servers for Stardog Languages
Other
30 stars 6 forks source link

SPARQL autocompletion doesn't handle longer alternatives correctly #10

Closed jmrog closed 5 years ago

jmrog commented 5 years ago

Report:

If I start typing str, functions like strbefore, strstarts, etc. are listed in the autocomplete. However if I type strs then strstarts (and the rest of the list) goes away and all I get is what looks to be the namespace stardog.

This is happening because whitespace is ignored between tokens in SPARQL, so 'strs' can be tokenized as STR and Unknown (for 's'). Either way, it cannot be tokenized as STRSTARTS, so the autocomplete results don't end up being correct in this case; the results of chevrotain's computeContentAssist need to be supplemented.