Allow end as a substring of vertex id

Jison adds \b (word boundary) to literal string patterns by default.
It does so, because it doesn't follow traditional match-longest
approach, but does match-first instead. Without including word
boundaries, it'd be hard to distinguish between a keyword and
identifier.

The pattern for `end` keyword is not a simple string literal - it
swallows trailing whitespace, so we have to add \b manually.

This partially fixes #184 - at least now `end` behaves the same as other
keywords: it can be used as a prefix and infix, but not as a suffix.

To solve this issue completely, ALPHA pattern would have to match
multiple letters, which is a much bigger change.
This commit is contained in:
Tomasz Szczęśniak-Szlagowski
2015-10-15 00:31:18 +01:00
parent ed65e6df3b
commit b87764ed94
10 changed files with 42 additions and 22 deletions

File diff suppressed because one or more lines are too long