fork of https://github.com/tree-sitter/tree-sitter-graph
1{
2 "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
3 "name": "Tree-Sitter Graph",
4 "patterns": [{
5 "include": "#keywords"
6 }, {
7 "include": "#functions"
8 }, {
9 "include": "#constants"
10 }, {
11 "include": "#strings"
12 }, {
13 "include": "#comments"
14 }],
15 "repository": {
16 "keywords": {
17 "patterns": [{
18 "name": "keyword.control.tsg",
19 "match": "^\\s*(attr|attribute|edge|else|for|global|if|inherit|let|node|none|print|scan|set|some|var)\\b"
20 }]
21 },
22 "functions": {
23 "patterns": [{
24 "name": "support.function.tsg",
25 "match":"(?<=\\(\\s*)(and|end-column|end-row|is-empty|is-null|length|named-child-count|named-child-index|node|node-type|not|or|plus|replace|source-text|start-column|start-row)\\b"
26 }]
27 },
28 "constants": {
29 "patterns": [{
30 "name": "constant.language.tsg",
31 "match": "\\b(#false|#nil|#true)\\b"
32 }]
33 },
34 "strings": {
35 "name": "string.quoted.double.tsg",
36 "begin": "\"",
37 "end": "\"",
38 "patterns": [{
39 "name": "constant.character.escape.tsg",
40 "match": "\\\\."
41 }]
42 },
43 "comments": {
44 "patterns": [{
45 "name": "comment.line.semicolon.tsg",
46 "begin": ";",
47 "end": "$"
48 }]
49 }
50 },
51 "scopeName": "source.tsg"
52}