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)), |