@codingame/monaco-vscode-standalone-languages 23.2.1 → 23.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. package/_.contribution.js +48 -0
  2. package/abap/abap.contribution.js +8 -0
  3. package/abap/abap.js +1397 -0
  4. package/apex/apex.contribution.js +9 -0
  5. package/apex/apex.js +329 -0
  6. package/azcli/azcli.contribution.js +8 -0
  7. package/azcli/azcli.js +67 -0
  8. package/bat/bat.contribution.js +8 -0
  9. package/bat/bat.js +99 -0
  10. package/bicep/bicep.contribution.js +8 -0
  11. package/bicep/bicep.js +108 -0
  12. package/cameligo/cameligo.contribution.js +8 -0
  13. package/cameligo/cameligo.js +173 -0
  14. package/clojure/clojure.contribution.js +8 -0
  15. package/clojure/clojure.js +760 -0
  16. package/coffee/coffee.contribution.js +9 -0
  17. package/coffee/coffee.js +231 -0
  18. package/cpp/cpp.contribution.js +14 -0
  19. package/cpp/cpp.js +388 -0
  20. package/csharp/csharp.contribution.js +8 -0
  21. package/csharp/csharp.js +325 -0
  22. package/csp/csp.contribution.js +8 -0
  23. package/csp/csp.js +52 -0
  24. package/css/css.contribution.js +9 -0
  25. package/css/css.js +184 -0
  26. package/cypher/cypher.contribution.js +8 -0
  27. package/cypher/cypher.js +262 -0
  28. package/dart/dart.contribution.js +9 -0
  29. package/dart/dart.js +280 -0
  30. package/dockerfile/dockerfile.contribution.js +9 -0
  31. package/dockerfile/dockerfile.js +129 -0
  32. package/ecl/ecl.contribution.js +8 -0
  33. package/ecl/ecl.js +455 -0
  34. package/elixir/elixir.contribution.js +8 -0
  35. package/elixir/elixir.js +568 -0
  36. package/flow9/flow9.contribution.js +8 -0
  37. package/flow9/flow9.js +141 -0
  38. package/freemarker2/freemarker2.contribution.js +52 -0
  39. package/freemarker2/freemarker2.js +990 -0
  40. package/fsharp/fsharp.contribution.js +8 -0
  41. package/fsharp/fsharp.js +216 -0
  42. package/go/go.contribution.js +8 -0
  43. package/go/go.js +217 -0
  44. package/graphql/graphql.contribution.js +9 -0
  45. package/graphql/graphql.js +150 -0
  46. package/handlebars/handlebars.contribution.js +9 -0
  47. package/handlebars/handlebars.js +413 -0
  48. package/hcl/hcl.contribution.js +8 -0
  49. package/hcl/hcl.js +182 -0
  50. package/html/html.contribution.js +9 -0
  51. package/html/html.js +302 -0
  52. package/index.js +81 -48
  53. package/ini/ini.contribution.js +9 -0
  54. package/ini/ini.js +70 -0
  55. package/java/java.contribution.js +9 -0
  56. package/java/java.js +231 -0
  57. package/javascript/javascript.contribution.js +11 -0
  58. package/javascript/javascript.js +70 -0
  59. package/julia/julia.contribution.js +8 -0
  60. package/julia/julia.js +510 -0
  61. package/kotlin/kotlin.contribution.js +9 -0
  62. package/kotlin/kotlin.js +251 -0
  63. package/less/less.contribution.js +9 -0
  64. package/less/less.js +160 -0
  65. package/lexon/lexon.contribution.js +8 -0
  66. package/lexon/lexon.js +156 -0
  67. package/liquid/liquid.contribution.js +9 -0
  68. package/liquid/liquid.js +234 -0
  69. package/lua/lua.contribution.js +8 -0
  70. package/lua/lua.js +161 -0
  71. package/m3/m3.contribution.js +8 -0
  72. package/m3/m3.js +209 -0
  73. package/markdown/markdown.contribution.js +8 -0
  74. package/markdown/markdown.js +228 -0
  75. package/mdx/mdx.contribution.js +8 -0
  76. package/mdx/mdx.js +158 -0
  77. package/mips/mips.contribution.js +9 -0
  78. package/mips/mips.js +197 -0
  79. package/msdax/msdax.contribution.js +8 -0
  80. package/msdax/msdax.js +374 -0
  81. package/mysql/mysql.contribution.js +8 -0
  82. package/mysql/mysql.js +877 -0
  83. package/objective-c/objective-c.contribution.js +8 -0
  84. package/objective-c/objective-c.js +182 -0
  85. package/package.json +2 -2
  86. package/pascal/pascal.contribution.js +9 -0
  87. package/pascal/pascal.js +250 -0
  88. package/pascaligo/pascaligo.contribution.js +8 -0
  89. package/pascaligo/pascaligo.js +163 -0
  90. package/perl/perl.contribution.js +8 -0
  91. package/perl/perl.js +625 -0
  92. package/pgsql/pgsql.contribution.js +8 -0
  93. package/pgsql/pgsql.js +850 -0
  94. package/php/php.contribution.js +9 -0
  95. package/php/php.js +499 -0
  96. package/pla/pla.contribution.js +7 -0
  97. package/pla/pla.js +136 -0
  98. package/postiats/postiats.contribution.js +8 -0
  99. package/postiats/postiats.js +906 -0
  100. package/powerquery/powerquery.contribution.js +8 -0
  101. package/powerquery/powerquery.js +889 -0
  102. package/powershell/powershell.contribution.js +8 -0
  103. package/powershell/powershell.js +238 -0
  104. package/protobuf/protobuf.contribution.js +8 -0
  105. package/protobuf/protobuf.js +419 -0
  106. package/pug/pug.contribution.js +8 -0
  107. package/pug/pug.js +401 -0
  108. package/python/python.contribution.js +9 -0
  109. package/python/python.js +294 -0
  110. package/qsharp/qsharp.contribution.js +8 -0
  111. package/qsharp/qsharp.js +300 -0
  112. package/r/r.contribution.js +8 -0
  113. package/r/r.js +242 -0
  114. package/razor/razor.contribution.js +9 -0
  115. package/razor/razor.js +544 -0
  116. package/redis/redis.contribution.js +8 -0
  117. package/redis/redis.js +301 -0
  118. package/redshift/redshift.contribution.js +8 -0
  119. package/redshift/redshift.js +808 -0
  120. package/restructuredtext/restructuredtext.contribution.js +8 -0
  121. package/restructuredtext/restructuredtext.js +173 -0
  122. package/ruby/ruby.contribution.js +9 -0
  123. package/ruby/ruby.js +510 -0
  124. package/rust/rust.contribution.js +8 -0
  125. package/rust/rust.js +342 -0
  126. package/sb/sb.contribution.js +8 -0
  127. package/sb/sb.js +114 -0
  128. package/scala/scala.contribution.js +9 -0
  129. package/scala/scala.js +369 -0
  130. package/scheme/scheme.contribution.js +8 -0
  131. package/scheme/scheme.js +107 -0
  132. package/scss/scss.contribution.js +9 -0
  133. package/scss/scss.js +259 -0
  134. package/shell/shell.contribution.js +8 -0
  135. package/shell/shell.js +220 -0
  136. package/solidity/solidity.contribution.js +8 -0
  137. package/solidity/solidity.js +1366 -0
  138. package/sophia/sophia.contribution.js +8 -0
  139. package/sophia/sophia.js +198 -0
  140. package/sparql/sparql.contribution.js +8 -0
  141. package/sparql/sparql.js +200 -0
  142. package/sql/sql.contribution.js +8 -0
  143. package/sql/sql.js +852 -0
  144. package/st/st.contribution.js +8 -0
  145. package/st/st.js +415 -0
  146. package/swift/swift.contribution.js +9 -0
  147. package/swift/swift.js +311 -0
  148. package/systemverilog/systemverilog.contribution.js +14 -0
  149. package/systemverilog/systemverilog.js +575 -0
  150. package/tcl/tcl.contribution.js +8 -0
  151. package/tcl/tcl.js +231 -0
  152. package/twig/twig.contribution.js +9 -0
  153. package/twig/twig.js +391 -0
  154. package/typescript/typescript.contribution.js +11 -0
  155. package/typescript/typescript.js +336 -0
  156. package/typespec/typespec.contribution.js +8 -0
  157. package/typespec/typespec.js +126 -0
  158. package/vb/vb.contribution.js +8 -0
  159. package/vb/vb.js +371 -0
  160. package/wgsl/wgsl.contribution.js +8 -0
  161. package/wgsl/wgsl.js +452 -0
  162. package/xml/xml.contribution.js +28 -0
  163. package/xml/xml.js +88 -0
  164. package/yaml/yaml.contribution.js +9 -0
  165. package/yaml/yaml.js +199 -0
@@ -0,0 +1,8 @@
1
+ import { registerLanguage } from '../_.contribution.js';
2
+
3
+ registerLanguage({
4
+ id: "objective-c",
5
+ extensions: [".m"],
6
+ aliases: ["Objective-C"],
7
+ loader: () => import('./objective-c.js')
8
+ });
@@ -0,0 +1,182 @@
1
+ const conf = {
2
+ comments: {
3
+ lineComment: "//",
4
+ blockComment: ["/*", "*/"]
5
+ },
6
+ brackets: [
7
+ ["{", "}"],
8
+ ["[", "]"],
9
+ ["(", ")"]
10
+ ],
11
+ autoClosingPairs: [
12
+ { open: "{", close: "}" },
13
+ { open: "[", close: "]" },
14
+ { open: "(", close: ")" },
15
+ { open: '"', close: '"' },
16
+ { open: "'", close: "'" }
17
+ ],
18
+ surroundingPairs: [
19
+ { open: "{", close: "}" },
20
+ { open: "[", close: "]" },
21
+ { open: "(", close: ")" },
22
+ { open: '"', close: '"' },
23
+ { open: "'", close: "'" }
24
+ ]
25
+ };
26
+ const language = {
27
+ defaultToken: "",
28
+ tokenPostfix: ".objective-c",
29
+ keywords: [
30
+ "#import",
31
+ "#include",
32
+ "#define",
33
+ "#else",
34
+ "#endif",
35
+ "#if",
36
+ "#ifdef",
37
+ "#ifndef",
38
+ "#ident",
39
+ "#undef",
40
+ "@class",
41
+ "@defs",
42
+ "@dynamic",
43
+ "@encode",
44
+ "@end",
45
+ "@implementation",
46
+ "@interface",
47
+ "@package",
48
+ "@private",
49
+ "@protected",
50
+ "@property",
51
+ "@protocol",
52
+ "@public",
53
+ "@selector",
54
+ "@synthesize",
55
+ "__declspec",
56
+ "assign",
57
+ "auto",
58
+ "BOOL",
59
+ "break",
60
+ "bycopy",
61
+ "byref",
62
+ "case",
63
+ "char",
64
+ "Class",
65
+ "const",
66
+ "copy",
67
+ "continue",
68
+ "default",
69
+ "do",
70
+ "double",
71
+ "else",
72
+ "enum",
73
+ "extern",
74
+ "FALSE",
75
+ "false",
76
+ "float",
77
+ "for",
78
+ "goto",
79
+ "if",
80
+ "in",
81
+ "int",
82
+ "id",
83
+ "inout",
84
+ "IMP",
85
+ "long",
86
+ "nil",
87
+ "nonatomic",
88
+ "NULL",
89
+ "oneway",
90
+ "out",
91
+ "private",
92
+ "public",
93
+ "protected",
94
+ "readwrite",
95
+ "readonly",
96
+ "register",
97
+ "return",
98
+ "SEL",
99
+ "self",
100
+ "short",
101
+ "signed",
102
+ "sizeof",
103
+ "static",
104
+ "struct",
105
+ "super",
106
+ "switch",
107
+ "typedef",
108
+ "TRUE",
109
+ "true",
110
+ "union",
111
+ "unsigned",
112
+ "volatile",
113
+ "void",
114
+ "while"
115
+ ],
116
+ decpart: /\d(_?\d)*/,
117
+ decimal: /0|@decpart/,
118
+ tokenizer: {
119
+ root: [
120
+ { include: "@comments" },
121
+ { include: "@whitespace" },
122
+ { include: "@numbers" },
123
+ { include: "@strings" },
124
+ [/[,:;]/, "delimiter"],
125
+ [/[{}\[\]()<>]/, "@brackets"],
126
+ [
127
+ /[a-zA-Z@#]\w*/,
128
+ {
129
+ cases: {
130
+ "@keywords": "keyword",
131
+ "@default": "identifier"
132
+ }
133
+ }
134
+ ],
135
+ [/[<>=\\+\\-\\*\\/\\^\\|\\~,]|and\\b|or\\b|not\\b]/, "operator"]
136
+ ],
137
+ whitespace: [[/\s+/, "white"]],
138
+ comments: [
139
+ ["\\/\\*", "comment", "@comment"],
140
+ ["\\/\\/+.*", "comment"]
141
+ ],
142
+ comment: [
143
+ ["\\*\\/", "comment", "@pop"],
144
+ [".", "comment"]
145
+ ],
146
+ numbers: [
147
+ [/0[xX][0-9a-fA-F]*(_?[0-9a-fA-F])*/, "number.hex"],
148
+ [
149
+ /@decimal((\.@decpart)?([eE][\-+]?@decpart)?)[fF]*/,
150
+ {
151
+ cases: {
152
+ "(\\d)*": "number",
153
+ $0: "number.float"
154
+ }
155
+ }
156
+ ]
157
+ ],
158
+ // Recognize strings, including those broken across lines with \ (but not without)
159
+ strings: [
160
+ [/'$/, "string.escape", "@popall"],
161
+ [/'/, "string.escape", "@stringBody"],
162
+ [/"$/, "string.escape", "@popall"],
163
+ [/"/, "string.escape", "@dblStringBody"]
164
+ ],
165
+ stringBody: [
166
+ [/[^\\']+$/, "string", "@popall"],
167
+ [/[^\\']+/, "string"],
168
+ [/\\./, "string"],
169
+ [/'/, "string.escape", "@popall"],
170
+ [/\\$/, "string"]
171
+ ],
172
+ dblStringBody: [
173
+ [/[^\\"]+$/, "string", "@popall"],
174
+ [/[^\\"]+/, "string"],
175
+ [/\\./, "string"],
176
+ [/"/, "string.escape", "@popall"],
177
+ [/\\$/, "string"]
178
+ ]
179
+ }
180
+ };
181
+
182
+ export { conf, language };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-standalone-languages",
3
- "version": "23.2.1",
3
+ "version": "23.3.0",
4
4
  "keywords": [],
5
5
  "author": {
6
6
  "name": "CodinGame",
@@ -18,6 +18,6 @@
18
18
  "module": "index.js",
19
19
  "types": "index.d.ts",
20
20
  "dependencies": {
21
- "monaco-editor": "npm:@codingame/monaco-vscode-editor-api@23.2.1"
21
+ "monaco-editor": "npm:@codingame/monaco-vscode-editor-api@23.3.0"
22
22
  }
23
23
  }
@@ -0,0 +1,9 @@
1
+ import { registerLanguage } from '../_.contribution.js';
2
+
3
+ registerLanguage({
4
+ id: "pascal",
5
+ extensions: [".pas", ".p", ".pp"],
6
+ aliases: ["Pascal", "pas"],
7
+ mimetypes: ["text/x-pascal-source", "text/x-pascal"],
8
+ loader: () => import('./pascal.js')
9
+ });
@@ -0,0 +1,250 @@
1
+ const conf = {
2
+ // the default separators except `@$`
3
+ wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
4
+ comments: {
5
+ lineComment: "//",
6
+ blockComment: ["{", "}"]
7
+ },
8
+ brackets: [
9
+ ["{", "}"],
10
+ ["[", "]"],
11
+ ["(", ")"],
12
+ ["<", ">"]
13
+ ],
14
+ autoClosingPairs: [
15
+ { open: "{", close: "}" },
16
+ { open: "[", close: "]" },
17
+ { open: "(", close: ")" },
18
+ { open: "<", close: ">" },
19
+ { open: "'", close: "'" }
20
+ ],
21
+ surroundingPairs: [
22
+ { open: "{", close: "}" },
23
+ { open: "[", close: "]" },
24
+ { open: "(", close: ")" },
25
+ { open: "<", close: ">" },
26
+ { open: "'", close: "'" }
27
+ ],
28
+ folding: {
29
+ markers: {
30
+ start: new RegExp("^\\s*\\{\\$REGION(\\s\\'.*\\')?\\}"),
31
+ end: new RegExp("^\\s*\\{\\$ENDREGION\\}")
32
+ }
33
+ }
34
+ };
35
+ const language = {
36
+ defaultToken: "",
37
+ tokenPostfix: ".pascal",
38
+ ignoreCase: true,
39
+ brackets: [
40
+ { open: "{", close: "}", token: "delimiter.curly" },
41
+ { open: "[", close: "]", token: "delimiter.square" },
42
+ { open: "(", close: ")", token: "delimiter.parenthesis" },
43
+ { open: "<", close: ">", token: "delimiter.angle" }
44
+ ],
45
+ keywords: [
46
+ "absolute",
47
+ "abstract",
48
+ "all",
49
+ "and_then",
50
+ "array",
51
+ "as",
52
+ "asm",
53
+ "attribute",
54
+ "begin",
55
+ "bindable",
56
+ "case",
57
+ "class",
58
+ "const",
59
+ "contains",
60
+ "default",
61
+ "div",
62
+ "else",
63
+ "end",
64
+ "except",
65
+ "exports",
66
+ "external",
67
+ "far",
68
+ "file",
69
+ "finalization",
70
+ "finally",
71
+ "forward",
72
+ "generic",
73
+ "goto",
74
+ "if",
75
+ "implements",
76
+ "import",
77
+ "in",
78
+ "index",
79
+ "inherited",
80
+ "initialization",
81
+ "interrupt",
82
+ "is",
83
+ "label",
84
+ "library",
85
+ "mod",
86
+ "module",
87
+ "name",
88
+ "near",
89
+ "not",
90
+ "object",
91
+ "of",
92
+ "on",
93
+ "only",
94
+ "operator",
95
+ "or_else",
96
+ "otherwise",
97
+ "override",
98
+ "package",
99
+ "packed",
100
+ "pow",
101
+ "private",
102
+ "program",
103
+ "protected",
104
+ "public",
105
+ "published",
106
+ "interface",
107
+ "implementation",
108
+ "qualified",
109
+ "read",
110
+ "record",
111
+ "resident",
112
+ "requires",
113
+ "resourcestring",
114
+ "restricted",
115
+ "segment",
116
+ "set",
117
+ "shl",
118
+ "shr",
119
+ "specialize",
120
+ "stored",
121
+ "strict",
122
+ "then",
123
+ "threadvar",
124
+ "to",
125
+ "try",
126
+ "type",
127
+ "unit",
128
+ "uses",
129
+ "var",
130
+ "view",
131
+ "virtual",
132
+ "dynamic",
133
+ "overload",
134
+ "reintroduce",
135
+ "with",
136
+ "write",
137
+ "xor",
138
+ "true",
139
+ "false",
140
+ "procedure",
141
+ "function",
142
+ "constructor",
143
+ "destructor",
144
+ "property",
145
+ "break",
146
+ "continue",
147
+ "exit",
148
+ "abort",
149
+ "while",
150
+ "do",
151
+ "for",
152
+ "raise",
153
+ "repeat",
154
+ "until"
155
+ ],
156
+ typeKeywords: [
157
+ "boolean",
158
+ "double",
159
+ "byte",
160
+ "integer",
161
+ "shortint",
162
+ "char",
163
+ "longint",
164
+ "float",
165
+ "string"
166
+ ],
167
+ operators: [
168
+ "=",
169
+ ">",
170
+ "<",
171
+ "<=",
172
+ ">=",
173
+ "<>",
174
+ ":",
175
+ ":=",
176
+ "and",
177
+ "or",
178
+ "+",
179
+ "-",
180
+ "*",
181
+ "/",
182
+ "@",
183
+ "&",
184
+ "^",
185
+ "%"
186
+ ],
187
+ // we include these common regular expressions
188
+ symbols: /[=><:@\^&|+\-*\/\^%]+/,
189
+ // The main tokenizer for our languages
190
+ tokenizer: {
191
+ root: [
192
+ // identifiers and keywords
193
+ [
194
+ /[a-zA-Z_][\w]*/,
195
+ {
196
+ cases: {
197
+ "@keywords": { token: "keyword.$0" },
198
+ "@default": "identifier"
199
+ }
200
+ }
201
+ ],
202
+ // whitespace
203
+ { include: "@whitespace" },
204
+ // delimiters and operators
205
+ [/[{}()\[\]]/, "@brackets"],
206
+ [/[<>](?!@symbols)/, "@brackets"],
207
+ [
208
+ /@symbols/,
209
+ {
210
+ cases: {
211
+ "@operators": "delimiter",
212
+ "@default": ""
213
+ }
214
+ }
215
+ ],
216
+ // numbers
217
+ [/\d*\.\d+([eE][\-+]?\d+)?/, "number.float"],
218
+ [/\$[0-9a-fA-F]{1,16}/, "number.hex"],
219
+ [/\d+/, "number"],
220
+ // delimiter: after number because of .\d floats
221
+ [/[;,.]/, "delimiter"],
222
+ // strings
223
+ [/'([^'\\]|\\.)*$/, "string.invalid"],
224
+ // non-teminated string
225
+ [/'/, "string", "@string"],
226
+ // characters
227
+ [/'[^\\']'/, "string"],
228
+ [/'/, "string.invalid"],
229
+ [/\#\d+/, "string"]
230
+ ],
231
+ comment: [
232
+ [/[^\*\}]+/, "comment"],
233
+ //[/\(\*/, 'comment', '@push' ], // nested comment not allowed :-(
234
+ [/\}/, "comment", "@pop"],
235
+ [/[\{]/, "comment"]
236
+ ],
237
+ string: [
238
+ [/[^\\']+/, "string"],
239
+ [/\\./, "string.escape.invalid"],
240
+ [/'/, { token: "string.quote", bracket: "@close", next: "@pop" }]
241
+ ],
242
+ whitespace: [
243
+ [/[ \t\r\n]+/, "white"],
244
+ [/\{/, "comment", "@comment"],
245
+ [/\/\/.*$/, "comment"]
246
+ ]
247
+ }
248
+ };
249
+
250
+ export { conf, language };
@@ -0,0 +1,8 @@
1
+ import { registerLanguage } from '../_.contribution.js';
2
+
3
+ registerLanguage({
4
+ id: "pascaligo",
5
+ extensions: [".ligo"],
6
+ aliases: ["Pascaligo", "ligo"],
7
+ loader: () => import('./pascaligo.js')
8
+ });
@@ -0,0 +1,163 @@
1
+ const conf = {
2
+ comments: {
3
+ lineComment: "//",
4
+ blockComment: ["(*", "*)"]
5
+ },
6
+ brackets: [
7
+ ["{", "}"],
8
+ ["[", "]"],
9
+ ["(", ")"],
10
+ ["<", ">"]
11
+ ],
12
+ autoClosingPairs: [
13
+ { open: "{", close: "}" },
14
+ { open: "[", close: "]" },
15
+ { open: "(", close: ")" },
16
+ { open: "<", close: ">" },
17
+ { open: "'", close: "'" }
18
+ ],
19
+ surroundingPairs: [
20
+ { open: "{", close: "}" },
21
+ { open: "[", close: "]" },
22
+ { open: "(", close: ")" },
23
+ { open: "<", close: ">" },
24
+ { open: "'", close: "'" }
25
+ ]
26
+ };
27
+ const language = {
28
+ defaultToken: "",
29
+ tokenPostfix: ".pascaligo",
30
+ ignoreCase: true,
31
+ brackets: [
32
+ { open: "{", close: "}", token: "delimiter.curly" },
33
+ { open: "[", close: "]", token: "delimiter.square" },
34
+ { open: "(", close: ")", token: "delimiter.parenthesis" },
35
+ { open: "<", close: ">", token: "delimiter.angle" }
36
+ ],
37
+ keywords: [
38
+ "begin",
39
+ "block",
40
+ "case",
41
+ "const",
42
+ "else",
43
+ "end",
44
+ "fail",
45
+ "for",
46
+ "from",
47
+ "function",
48
+ "if",
49
+ "is",
50
+ "nil",
51
+ "of",
52
+ "remove",
53
+ "return",
54
+ "skip",
55
+ "then",
56
+ "type",
57
+ "var",
58
+ "while",
59
+ "with",
60
+ "option",
61
+ "None",
62
+ "transaction"
63
+ ],
64
+ typeKeywords: [
65
+ "bool",
66
+ "int",
67
+ "list",
68
+ "map",
69
+ "nat",
70
+ "record",
71
+ "string",
72
+ "unit",
73
+ "address",
74
+ "map",
75
+ "mtz",
76
+ "xtz"
77
+ ],
78
+ operators: [
79
+ "=",
80
+ ">",
81
+ "<",
82
+ "<=",
83
+ ">=",
84
+ "<>",
85
+ ":",
86
+ ":=",
87
+ "and",
88
+ "mod",
89
+ "or",
90
+ "+",
91
+ "-",
92
+ "*",
93
+ "/",
94
+ "@",
95
+ "&",
96
+ "^",
97
+ "%"
98
+ ],
99
+ // we include these common regular expressions
100
+ symbols: /[=><:@\^&|+\-*\/\^%]+/,
101
+ // The main tokenizer for our languages
102
+ tokenizer: {
103
+ root: [
104
+ // identifiers and keywords
105
+ [
106
+ /[a-zA-Z_][\w]*/,
107
+ {
108
+ cases: {
109
+ "@keywords": { token: "keyword.$0" },
110
+ "@default": "identifier"
111
+ }
112
+ }
113
+ ],
114
+ // whitespace
115
+ { include: "@whitespace" },
116
+ // delimiters and operators
117
+ [/[{}()\[\]]/, "@brackets"],
118
+ [/[<>](?!@symbols)/, "@brackets"],
119
+ [
120
+ /@symbols/,
121
+ {
122
+ cases: {
123
+ "@operators": "delimiter",
124
+ "@default": ""
125
+ }
126
+ }
127
+ ],
128
+ // numbers
129
+ [/\d*\.\d+([eE][\-+]?\d+)?/, "number.float"],
130
+ [/\$[0-9a-fA-F]{1,16}/, "number.hex"],
131
+ [/\d+/, "number"],
132
+ // delimiter: after number because of .\d floats
133
+ [/[;,.]/, "delimiter"],
134
+ // strings
135
+ [/'([^'\\]|\\.)*$/, "string.invalid"],
136
+ // non-teminated string
137
+ [/'/, "string", "@string"],
138
+ // characters
139
+ [/'[^\\']'/, "string"],
140
+ [/'/, "string.invalid"],
141
+ [/\#\d+/, "string"]
142
+ ],
143
+ /* */
144
+ comment: [
145
+ [/[^\(\*]+/, "comment"],
146
+ //[/\(\*/, 'comment', '@push' ], // nested comment not allowed :-(
147
+ [/\*\)/, "comment", "@pop"],
148
+ [/\(\*/, "comment"]
149
+ ],
150
+ string: [
151
+ [/[^\\']+/, "string"],
152
+ [/\\./, "string.escape.invalid"],
153
+ [/'/, { token: "string.quote", bracket: "@close", next: "@pop" }]
154
+ ],
155
+ whitespace: [
156
+ [/[ \t\r\n]+/, "white"],
157
+ [/\(\*/, "comment", "@comment"],
158
+ [/\/\/.*$/, "comment"]
159
+ ]
160
+ }
161
+ };
162
+
163
+ export { conf, language };
@@ -0,0 +1,8 @@
1
+ import { registerLanguage } from '../_.contribution.js';
2
+
3
+ registerLanguage({
4
+ id: "perl",
5
+ extensions: [".pl", ".pm"],
6
+ aliases: ["Perl", "pl"],
7
+ loader: () => import('./perl.js')
8
+ });