package tm-grammars

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Source file tm_grammar_rel.ml

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