diff options
author | Matthäus G. Chajdas <dev@anteru.net> | 2021-12-29 17:00:12 +0100 |
---|---|---|
committer | Matthäus G. Chajdas <dev@anteru.net> | 2021-12-29 17:00:12 +0100 |
commit | 2817227fa86f11db389304572e21ecaff37b2226 (patch) | |
tree | 0345a2a32a18e8b1df92f124959ca2baaf9fcc7d /pygments/lexers/graph.py | |
parent | 7b3692f99d5100dd1471ec37e22e10fa37e54c30 (diff) | |
download | pygments-git-2817227fa86f11db389304572e21ecaff37b2226.tar.gz |
Use words in Cypher lexer.
Diffstat (limited to 'pygments/lexers/graph.py')
-rw-r--r-- | pygments/lexers/graph.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/pygments/lexers/graph.py b/pygments/lexers/graph.py index 163cf804..2af56af2 100644 --- a/pygments/lexers/graph.py +++ b/pygments/lexers/graph.py @@ -10,7 +10,7 @@ import re -from pygments.lexer import RegexLexer, include, bygroups, using, this +from pygments.lexer import RegexLexer, include, bygroups, using, this, words from pygments.token import Keyword, Punctuation, Comment, Operator, Name,\ String, Number, Whitespace @@ -76,11 +76,12 @@ class CypherLexer(RegexLexer): bygroups(Keyword, Whitespace, Keyword)), (r'(using)(\s+)(periodic)(\s+)(commit)\b', bygroups(Keyword, Whitespace, Keyword, Whitespace, Keyword)), - (r'(all|any|as|asc|ascending|assert|call|case|create|' - r'delete|desc|descending|distinct|end|fieldterminator|' - r'foreach|in|limit|match|merge|none|not|null|' - r'remove|return|set|skip|single|start|then|union|' - r'unwind|yield|where|when|with)\b', Keyword), + (words(( + 'all', 'any', 'as', 'asc', 'ascending', 'assert', 'call', 'case', 'create', + 'delete', 'desc', 'descending', 'distinct', 'end', 'fieldterminator', + 'foreach', 'in', 'limit', 'match', 'merge', 'none', 'not', 'null', + 'remove', 'return', 'set', 'skip', 'single', 'start', 'then', 'union', + 'unwind', 'yield', 'where', 'when', 'with'), suffix=r'\b'), Keyword), ], 'relations': [ (r'(-\[)(.*?)(\]->)', bygroups(Operator, using(this), Operator)), |