vscode icon indicating copy to clipboard operation
vscode copied to clipboard

update syntax highlighting regex str

Open armchair-traveller opened this issue 4 years ago • 0 comments

Syntax highlighting for the following functions has yet to be added:

ContainsPath()
ContainsValue()
ContainsField()
AccessProvider()
AccessProviders()
CreateAccessProvider()
CurrentIdentity()
HasCurrentIdentity()
CurrentToken()
HasCurrentToken()

This pull request updates it to be in-line with the current syntax and is ordered as per https://docs.fauna.com/fauna/current/api/fql/cheat_sheet (which looks like the order the regex is following).

It also drops all deprecated syntax from being highlighted. The following has been removed:

SelectAll()
HasIdentity()
Identity()
Contains()
Math()
Class()
Classes()
CreateClass()

If that's not desired behavior, it can be modified, but as there's no linting rule to warn against deprecated syntax I feel like this can be one such alternative.

For example, I had assumed Identity() was valid syntax (it still is) and forgot it was deprecated because so many people are still using it. Honestly, the only flag that warned me of missing syntax highlighting was the fact Reverse() wasn't highlighted. Then I used CurrentIdentity()...

p.s. I use Reverse() so much. Love it. I hope I'm not abusing it and there isn't a performance issue that I'm unaware of.

armchair-traveller avatar Oct 20 '21 11:10 armchair-traveller