eric6/ThirdParty/Pygments/pygments/lexers/graph.py

changeset 7547
21b0534faebc
parent 6942
2602857055c5
child 7701
25f42e208e08
equal deleted inserted replaced
7546:bf5f777260a6 7547:21b0534faebc
3 pygments.lexers.graph 3 pygments.lexers.graph
4 ~~~~~~~~~~~~~~~~~~~~~ 4 ~~~~~~~~~~~~~~~~~~~~~
5 5
6 Lexers for graph query languages. 6 Lexers for graph query languages.
7 7
8 :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. 8 :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS.
9 :license: BSD, see LICENSE for details. 9 :license: BSD, see LICENSE for details.
10 """ 10 """
11 11
12 import re 12 import re
13 13
20 20
21 21
22 class CypherLexer(RegexLexer): 22 class CypherLexer(RegexLexer):
23 """ 23 """
24 For `Cypher Query Language 24 For `Cypher Query Language
25 <http://docs.neo4j.org/chunked/milestone/cypher-query-lang.html>`_ 25 <https://neo4j.com/docs/developer-manual/3.3/cypher/>`_
26 26
27 For the Cypher version in Neo4J 2.0 27 For the Cypher version in Neo4j 3.3
28 28
29 .. versionadded:: 2.0 29 .. versionadded:: 2.0
30 """ 30 """
31 name = 'Cypher' 31 name = 'Cypher'
32 aliases = ['cypher'] 32 aliases = ['cypher']
47 'comment': [ 47 'comment': [
48 (r'^.*//.*\n', Comment.Single), 48 (r'^.*//.*\n', Comment.Single),
49 ], 49 ],
50 'keywords': [ 50 'keywords': [
51 (r'(create|order|match|limit|set|skip|start|return|with|where|' 51 (r'(create|order|match|limit|set|skip|start|return|with|where|'
52 r'delete|foreach|not|by)\b', Keyword), 52 r'delete|foreach|not|by|true|false)\b', Keyword),
53 ], 53 ],
54 'clauses': [ 54 'clauses': [
55 # TODO: many missing ones, see http://docs.neo4j.org/refcard/2.0/ 55 # based on https://neo4j.com/docs/cypher-refcard/3.3/
56 (r'(all|any|as|asc|create|create\s+unique|delete|' 56 (r'(all|any|as|asc|ascending|assert|call|case|create|'
57 r'desc|distinct|foreach|in|is\s+null|limit|match|none|' 57 r'create\s+index|create\s+unique|delete|desc|descending|'
58 r'order\s+by|return|set|skip|single|start|union|where|with)\b', 58 r'distinct|drop\s+constraint\s+on|drop\s+index\s+on|end|'
59 Keyword), 59 r'ends\s+with|fieldterminator|foreach|in|is\s+node\s+key|'
60 r'is\s+null|is\s+unique|limit|load\s+csv\s+from|match|merge|none|'
61 r'not|null|on\s+match|on\s+create|optional\s+match|order\s+by|'
62 r'remove|return|set|skip|single|start|starts\s+with|then|union|'
63 r'union\s+all|unwind|using\s+periodic\s+commit|yield|where|when|'
64 r'with)\b', Keyword),
60 ], 65 ],
61 'relations': [ 66 'relations': [
62 (r'(-\[)(.*?)(\]->)', bygroups(Operator, using(this), Operator)), 67 (r'(-\[)(.*?)(\]->)', bygroups(Operator, using(this), Operator)),
63 (r'(<-\[)(.*?)(\]-)', bygroups(Operator, using(this), Operator)), 68 (r'(<-\[)(.*?)(\]-)', bygroups(Operator, using(this), Operator)),
64 (r'(-\[)(.*?)(\]-)', bygroups(Operator, using(this), Operator)), 69 (r'(-\[)(.*?)(\]-)', bygroups(Operator, using(this), Operator)),

eric ide

mercurial