summaryrefslogtreecommitdiff
path: root/pygments/lexers/graph.py
diff options
context:
space:
mode:
authorAnteru <bitbucket@ca.sh13.net>2019-04-30 15:52:31 +0000
committerAnteru <bitbucket@ca.sh13.net>2019-04-30 15:52:31 +0000
commit28a21bdafa1b73d5515de18bd263797af61c2471 (patch)
tree3436c730359d89153f04ef572368abfcde1d3fcb /pygments/lexers/graph.py
parente3872ea8f65ac2c3c40046a7a3acf4f0541f0e56 (diff)
parent601e6e86e45f31e23a7b29e1265d68aeba5e1366 (diff)
downloadpygments-28a21bdafa1b73d5515de18bd263797af61c2471.tar.gz
Merged in andrescarrasco/pygments-main/boa (pull request #756)
Add a lexer for the Boa Domain-Specific Langauge.
Diffstat (limited to 'pygments/lexers/graph.py')
-rw-r--r--pygments/lexers/graph.py21
1 files changed, 13 insertions, 8 deletions
diff --git a/pygments/lexers/graph.py b/pygments/lexers/graph.py
index 1a338246..6e836bdd 100644
--- a/pygments/lexers/graph.py
+++ b/pygments/lexers/graph.py
@@ -22,9 +22,9 @@ __all__ = ['CypherLexer']
class CypherLexer(RegexLexer):
"""
For `Cypher Query Language
- <http://docs.neo4j.org/chunked/milestone/cypher-query-lang.html>`_
+ <https://neo4j.com/docs/developer-manual/3.3/cypher/>`_
- For the Cypher version in Neo4J 2.0
+ For the Cypher version in Neo4j 3.3
.. versionadded:: 2.0
"""
@@ -49,14 +49,19 @@ class CypherLexer(RegexLexer):
],
'keywords': [
(r'(create|order|match|limit|set|skip|start|return|with|where|'
- r'delete|foreach|not|by)\b', Keyword),
+ r'delete|foreach|not|by|true|false)\b', Keyword),
],
'clauses': [
- # 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),
+ # based on https://neo4j.com/docs/cypher-refcard/3.3/
+ (r'(all|any|as|asc|ascending|assert|call|case|create|'
+ r'create\s+index|create\s+unique|delete|desc|descending|'
+ r'distinct|drop\s+constraint\s+on|drop\s+index\s+on|end|'
+ r'ends\s+with|fieldterminator|foreach|in|is\s+node\s+key|'
+ r'is\s+null|is\s+unique|limit|load\s+csv\s+from|match|merge|none|'
+ r'not|null|on\s+match|on\s+create|optional\s+match|order\s+by|'
+ r'remove|return|set|skip|single|start|starts\s+with|then|union|'
+ r'union\s+all|unwind|using\s+periodic\s+commit|yield|where|when|'
+ r'with)\b', Keyword),
],
'relations': [
(r'(-\[)(.*?)(\]->)', bygroups(Operator, using(this), Operator)),