Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Add missing pseudo-keywords & special vars, update operator precedence #165

Merged
merged 19 commits into from
Oct 9, 2019

Conversation

Btw. Should we add `OLD`, `NEW` pseudo-values in this variable names section as well?
@ifcologne
Copy link
Contributor Author

Btw. should we add the pseudo-variables OLD and NEW to the variables section as well?

3.5/aql/fundamentals-syntax.md Outdated Show resolved Hide resolved
@Simran-B
Copy link
Collaborator

Simran-B commented Sep 6, 2019

I went through the list of (key-)words using a simple query FOR doc IN coll RETURN doc.<word> and wrote down which are keywords (and their subtype), which are keyword-like and which are not keywords, see PrismJS/prism#2047

@Simran-B Simran-B self-assigned this Sep 6, 2019
@Simran-B Simran-B added this to the 3.5 milestone Sep 6, 2019
@Simran-B
Copy link
Collaborator

Note to self: do the special vars OLD and NEW shadow equally named variables? What is the scope? Can they be escaped to access the original variable value, or will that be equivalent to a quoted string literal?

@Simran-B
Copy link
Collaborator

Simran-B commented Sep 13, 2019

An unquoted string literal is called an identifier:
https://github.com/arangodb/arangodb/blob/devel/arangod/Aql/grammar.y#L247

Missed non-reserved words:

  • KEEP in COLLECT ... INTO ... KEEP
  • COUNT in COLLECT ... WITH COUNT INTO
  • PRUNE (FOR operation, before OPTIONS etc.)
  • CURRENT in inline expressions, e.g. arr[* RETURN CURRENT * 2] (this is actually a special var)

Possible optimizations for PrismJS:

  • OPTIONS must be followed by object ({ … }), however, there could be comments in between

3.5/aql/operators.md Outdated Show resolved Hide resolved
@Simran-B Simran-B requested a review from jsteemann September 13, 2019 13:34
@Simran-B Simran-B changed the title Added missing keywords Add missing pseudo-keywords & special vars, update operator precedence Sep 13, 2019
@Simran-B Simran-B merged commit d95ed97 into master Oct 9, 2019
@Simran-B Simran-B deleted the ifcologne-syntax-keywords branch October 9, 2019 14:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants