summaryrefslogtreecommitdiff
path: root/pygments/lexers/graph.py
diff options
context:
space:
mode:
authorTim Hatch <tim@timhatch.com>2014-04-24 10:49:18 -0400
committerTim Hatch <tim@timhatch.com>2014-04-24 10:49:18 -0400
commit0f5b7f40d2668c040d9096410cfc99f3a76d4433 (patch)
tree00b198cc143780fee314fb907c6b5c40a7bbd660 /pygments/lexers/graph.py
parent9b2efddd8f4d31545dd410688fa227bf79dbd919 (diff)
downloadpygments-0f5b7f40d2668c040d9096410cfc99f3a76d4433.tar.gz
Improve cypher keyword matching
Diffstat (limited to 'pygments/lexers/graph.py')
-rw-r--r--pygments/lexers/graph.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/pygments/lexers/graph.py b/pygments/lexers/graph.py
index 186af92f..fccba5a4 100644
--- a/pygments/lexers/graph.py
+++ b/pygments/lexers/graph.py
@@ -48,13 +48,14 @@ class CypherLexer(RegexLexer):
(r'^.*//.*\n', Comment.Single),
],
'keywords': [
- (r'create|order|match|limit|set|skip|start|return|with|where|delete'
- r'|foreach|not| by ', Keyword),
+ (r'(create|order|match|limit|set|skip|start|return|with|where|'
+ r'delete|foreach|not|by)\b', Keyword),
],
'clauses': [
- (r' all | any | as | asc |create|create unique|delete|'
- r'desc |distinct|foreach| in |is null|limit|match|none|'
- r'order by|return|set|skip|single|start|union|where|with',
+ # TODO: many missing ones, see http://docs.neo4j.org/refcard/2.0/
+ (r'(all|any|as|asc|create|create\s+unique|delete|'
+ r'desc|distinct|foreach|in|is\s+null|limit|match|none|'
+ r'order\s+by|return|set|skip|single|start|union|where|with)\b',
Keyword),
],
'relations': [