Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update syntax highlighting regex str #93

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

armchair-traveller
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant