| 1 |
{ |
| 2 |
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", |
| 3 |
"name": "rel", |
| 4 |
"patterns": [ |
| 5 |
{ |
| 6 |
"include": "#strings" |
| 7 |
}, |
| 8 |
{ |
| 9 |
"include": "#comment" |
| 10 |
}, |
| 11 |
{ |
| 12 |
"include": "#single-line-comment-consuming-line-ending" |
| 13 |
}, |
| 14 |
{ |
| 15 |
"include": "#deprecated-temporary" |
| 16 |
}, |
| 17 |
{ |
| 18 |
"include": "#operators" |
| 19 |
}, |
| 20 |
{ |
| 21 |
"include": "#symbols" |
| 22 |
}, |
| 23 |
{ |
| 24 |
"include": "#keywords" |
| 25 |
}, |
| 26 |
{ |
| 27 |
"include": "#otherkeywords" |
| 28 |
}, |
| 29 |
{ |
| 30 |
"include": "#types" |
| 31 |
}, |
| 32 |
{ |
| 33 |
"include": "#constants" |
| 34 |
} |
| 35 |
], |
| 36 |
"repository": { |
| 37 |
"strings": { |
| 38 |
"name": "string.quoted.double.rel", |
| 39 |
"begin": "\"", |
| 40 |
"end": "\"", |
| 41 |
"patterns": [ |
| 42 |
{ |
| 43 |
"name": "constant.character.escape.rel", |
| 44 |
"match": "\\\\." |
| 45 |
} |
| 46 |
] |
| 47 |
}, |
| 48 |
"comment": { |
| 49 |
"patterns": [ |
| 50 |
{ |
| 51 |
"name": "comment.block.documentation.rel", |
| 52 |
"begin": "/\\*\\*(?!/)", |
| 53 |
"beginCaptures": { |
| 54 |
"0": { |
| 55 |
"name": "punctuation.definition.comment.rel" |
| 56 |
} |
| 57 |
}, |
| 58 |
"end": "\\*/", |
| 59 |
"endCaptures": { |
| 60 |
"0": { |
| 61 |
"name": "punctuation.definition.comment.rel" |
| 62 |
} |
| 63 |
}, |
| 64 |
"patterns": [ |
| 65 |
{ |
| 66 |
"include": "#docblock" |
| 67 |
} |
| 68 |
] |
| 69 |
}, |
| 70 |
{ |
| 71 |
"name": "comment.block.rel", |
| 72 |
"begin": "(/\\*)(?:\\s*((@)internal)(?=\\s|(\\*/)))?", |
| 73 |
"beginCaptures": { |
| 74 |
"1": { |
| 75 |
"name": "punctuation.definition.comment.rel" |
| 76 |
}, |
| 77 |
"2": { |
| 78 |
"name": "storage.type.internaldeclaration.rel" |
| 79 |
}, |
| 80 |
"3": { |
| 81 |
"name": "punctuation.decorator.internaldeclaration.rel" |
| 82 |
} |
| 83 |
}, |
| 84 |
"end": "\\*/", |
| 85 |
"endCaptures": { |
| 86 |
"0": { |
| 87 |
"name": "punctuation.definition.comment.rel" |
| 88 |
} |
| 89 |
} |
| 90 |
}, |
| 91 |
{ |
| 92 |
"name": "comment.block.documentation.rel", |
| 93 |
"begin": "doc\"\"\"", |
| 94 |
"end": "\"\"\"" |
| 95 |
}, |
| 96 |
{ |
| 97 |
"begin": "(^[ \\t]+)?((//)(?:\\s*((@)internal)(?=\\s|$))?)", |
| 98 |
"beginCaptures": { |
| 99 |
"1": { |
| 100 |
"name": "punctuation.whitespace.comment.leading.rel" |
| 101 |
}, |
| 102 |
"2": { |
| 103 |
"name": "comment.line.double-slash.rel" |
| 104 |
}, |
| 105 |
"3": { |
| 106 |
"name": "punctuation.definition.comment.rel" |
| 107 |
}, |
| 108 |
"4": { |
| 109 |
"name": "storage.type.internaldeclaration.rel" |
| 110 |
}, |
| 111 |
"5": { |
| 112 |
"name": "punctuation.decorator.internaldeclaration.rel" |
| 113 |
} |
| 114 |
}, |
| 115 |
"end": "(?=$)", |
| 116 |
"contentName": "comment.line.double-slash.rel" |
| 117 |
} |
| 118 |
] |
| 119 |
}, |
| 120 |
"single-line-comment-consuming-line-ending": { |
| 121 |
"begin": "(^[ \\t]+)?((//)(?:\\s*((@)internal)(?=\\s|$))?)", |
| 122 |
"beginCaptures": { |
| 123 |
"1": { |
| 124 |
"name": "punctuation.whitespace.comment.leading.rel" |
| 125 |
}, |
| 126 |
"2": { |
| 127 |
"name": "comment.line.double-slash.rel" |
| 128 |
}, |
| 129 |
"3": { |
| 130 |
"name": "punctuation.definition.comment.rel" |
| 131 |
}, |
| 132 |
"4": { |
| 133 |
"name": "storage.type.internaldeclaration.rel" |
| 134 |
}, |
| 135 |
"5": { |
| 136 |
"name": "punctuation.decorator.internaldeclaration.rel" |
| 137 |
} |
| 138 |
}, |
| 139 |
"end": "(?=^)", |
| 140 |
"contentName": "comment.line.double-slash.rel" |
| 141 |
}, |
| 142 |
"deprecated-temporary": { |
| 143 |
"patterns": [ |
| 144 |
{ |
| 145 |
"name": "keyword.other.rel", |
| 146 |
"match": "@inspect" |
| 147 |
} |
| 148 |
] |
| 149 |
}, |
| 150 |
"operators": { |
| 151 |
"patterns": [ |
| 152 |
{ |
| 153 |
"name": "keyword.other.rel", |
| 154 |
"match": "(\\b(if|then|else|and|or|not|eq|neq|lt|lt_eq|gt|gt_eq)\\b)|(\\+|\\-|\\*|\\/|÷|\\^|\\%|\\=|\\!\\=|≠|\\<|\\<\\=|≤|\\>|\\>\\=|≥|\\&)|\\s+(end)" |
| 155 |
} |
| 156 |
] |
| 157 |
}, |
| 158 |
"symbols": { |
| 159 |
"patterns": [ |
| 160 |
{ |
| 161 |
"name": "variable.parameter.rel", |
| 162 |
"match": "(:[\\[_$[:alpha:]](\\]|[_$[:alnum:]]*))" |
| 163 |
} |
| 164 |
] |
| 165 |
}, |
| 166 |
"keywords": { |
| 167 |
"patterns": [ |
| 168 |
{ |
| 169 |
"name": "keyword.control.rel", |
| 170 |
"match": "(\\b(def|entity|bound|include|ic|forall|exists|∀|∃|return|module|^end)\\b)|(((\\<)?\\|(\\>)?)|∀|∃)" |
| 171 |
} |
| 172 |
] |
| 173 |
}, |
| 174 |
"otherkeywords": { |
| 175 |
"patterns": [ |
| 176 |
{ |
| 177 |
"name": "keyword.other.rel", |
| 178 |
"match": "\\s*(@inline)\\s*|\\s*(@auto_number)\\s*|\\s*(function)\\s|(\\b(implies|select|from|∈|where|for|in)\\b)|(((\\<)?\\|(\\>)?)|∈)" |
| 179 |
} |
| 180 |
] |
| 181 |
}, |
| 182 |
"types": { |
| 183 |
"patterns": [ |
| 184 |
{ |
| 185 |
"name": "entity.name.type.rel", |
| 186 |
"match": "(\\b(Symbol|Char|Bool|Rational|FixedDecimal|Float16|Float32|Float64|Int8|Int16|Int32|Int64|Int128|UInt8|UInt16|UInt32|UInt64|UInt128|Date|DateTime|Day|Week|Month|Year|Nanosecond|Microsecond|Millisecond|Second|Minute|Hour|FilePos|HashValue|AutoNumberValue)\\b)" |
| 187 |
} |
| 188 |
] |
| 189 |
}, |
| 190 |
"constants": { |
| 191 |
"patterns": [ |
| 192 |
{ |
| 193 |
"name": "constant.language.rel", |
| 194 |
"match": "(\\b(true|false)\\b)" |
| 195 |
} |
| 196 |
] |
| 197 |
} |
| 198 |
}, |
| 199 |
"scopeName": "source.rel" |
| 200 |
} |
| 201 |
|