feelin 4.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 (114) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +6 -0
  3. data/.rspec +2 -0
  4. data/CHANGELOG.md +10 -0
  5. data/Gemfile +3 -0
  6. data/LICENSE.txt +21 -0
  7. data/README.md +43 -0
  8. data/feelin.gemspec +22 -0
  9. data/lib/feelin/js/node_modules/.package-lock.json +67 -0
  10. data/lib/feelin/js/node_modules/@lezer/common/LICENSE +21 -0
  11. data/lib/feelin/js/node_modules/@lezer/common/README.md +14 -0
  12. data/lib/feelin/js/node_modules/@lezer/common/dist/index.cjs +2181 -0
  13. data/lib/feelin/js/node_modules/@lezer/common/dist/index.d.cts +1137 -0
  14. data/lib/feelin/js/node_modules/@lezer/common/dist/index.d.ts +1137 -0
  15. data/lib/feelin/js/node_modules/@lezer/common/dist/index.js +2168 -0
  16. data/lib/feelin/js/node_modules/@lezer/common/package.json +32 -0
  17. data/lib/feelin/js/node_modules/@lezer/highlight/LICENSE +21 -0
  18. data/lib/feelin/js/node_modules/@lezer/highlight/README.md +14 -0
  19. data/lib/feelin/js/node_modules/@lezer/highlight/dist/index.cjs +915 -0
  20. data/lib/feelin/js/node_modules/@lezer/highlight/dist/index.d.cts +621 -0
  21. data/lib/feelin/js/node_modules/@lezer/highlight/dist/index.d.ts +623 -0
  22. data/lib/feelin/js/node_modules/@lezer/highlight/dist/index.js +904 -0
  23. data/lib/feelin/js/node_modules/@lezer/highlight/package.json +31 -0
  24. data/lib/feelin/js/node_modules/@lezer/lr/LICENSE +21 -0
  25. data/lib/feelin/js/node_modules/@lezer/lr/README.md +25 -0
  26. data/lib/feelin/js/node_modules/@lezer/lr/dist/constants.d.ts +45 -0
  27. data/lib/feelin/js/node_modules/@lezer/lr/dist/constants.js +5 -0
  28. data/lib/feelin/js/node_modules/@lezer/lr/dist/index.cjs +1890 -0
  29. data/lib/feelin/js/node_modules/@lezer/lr/dist/index.d.cts +303 -0
  30. data/lib/feelin/js/node_modules/@lezer/lr/dist/index.d.ts +303 -0
  31. data/lib/feelin/js/node_modules/@lezer/lr/dist/index.js +1883 -0
  32. data/lib/feelin/js/node_modules/@lezer/lr/package.json +32 -0
  33. data/lib/feelin/js/node_modules/feelin/LICENSE +21 -0
  34. data/lib/feelin/js/node_modules/feelin/README.md +65 -0
  35. data/lib/feelin/js/node_modules/feelin/dist/builtins.d.ts +355 -0
  36. data/lib/feelin/js/node_modules/feelin/dist/index.cjs +2072 -0
  37. data/lib/feelin/js/node_modules/feelin/dist/index.cjs.map +1 -0
  38. data/lib/feelin/js/node_modules/feelin/dist/index.d.ts +3 -0
  39. data/lib/feelin/js/node_modules/feelin/dist/index.esm.js +2063 -0
  40. data/lib/feelin/js/node_modules/feelin/dist/index.esm.js.map +1 -0
  41. data/lib/feelin/js/node_modules/feelin/dist/interpreter.d.ts +26 -0
  42. data/lib/feelin/js/node_modules/feelin/dist/parser.d.ts +4 -0
  43. data/lib/feelin/js/node_modules/feelin/dist/temporal.d.ts +6 -0
  44. data/lib/feelin/js/node_modules/feelin/dist/types.d.ts +35 -0
  45. data/lib/feelin/js/node_modules/feelin/dist/utils.d.ts +12 -0
  46. data/lib/feelin/js/node_modules/feelin/package.json +63 -0
  47. data/lib/feelin/js/node_modules/lezer-feel/LICENSE +21 -0
  48. data/lib/feelin/js/node_modules/lezer-feel/README.md +94 -0
  49. data/lib/feelin/js/node_modules/lezer-feel/dist/index.cjs +1328 -0
  50. data/lib/feelin/js/node_modules/lezer-feel/dist/index.cjs.map +1 -0
  51. data/lib/feelin/js/node_modules/lezer-feel/dist/index.d.ts +32 -0
  52. data/lib/feelin/js/node_modules/lezer-feel/dist/index.js +1323 -0
  53. data/lib/feelin/js/node_modules/lezer-feel/dist/index.js.map +1 -0
  54. data/lib/feelin/js/node_modules/lezer-feel/package.json +61 -0
  55. data/lib/feelin/js/node_modules/luxon/LICENSE.md +7 -0
  56. data/lib/feelin/js/node_modules/luxon/README.md +55 -0
  57. data/lib/feelin/js/node_modules/luxon/build/amd/luxon.js +8623 -0
  58. data/lib/feelin/js/node_modules/luxon/build/amd/luxon.js.map +1 -0
  59. data/lib/feelin/js/node_modules/luxon/build/cjs-browser/luxon.js +8621 -0
  60. data/lib/feelin/js/node_modules/luxon/build/cjs-browser/luxon.js.map +1 -0
  61. data/lib/feelin/js/node_modules/luxon/build/es6/luxon.js +8011 -0
  62. data/lib/feelin/js/node_modules/luxon/build/es6/luxon.js.map +1 -0
  63. data/lib/feelin/js/node_modules/luxon/build/global/luxon.js +8626 -0
  64. data/lib/feelin/js/node_modules/luxon/build/global/luxon.js.map +1 -0
  65. data/lib/feelin/js/node_modules/luxon/build/global/luxon.min.js +1 -0
  66. data/lib/feelin/js/node_modules/luxon/build/global/luxon.min.js.map +1 -0
  67. data/lib/feelin/js/node_modules/luxon/build/node/luxon.js +7679 -0
  68. data/lib/feelin/js/node_modules/luxon/build/node/luxon.js.map +1 -0
  69. data/lib/feelin/js/node_modules/luxon/package.json +87 -0
  70. data/lib/feelin/js/node_modules/luxon/src/datetime.js +2566 -0
  71. data/lib/feelin/js/node_modules/luxon/src/duration.js +990 -0
  72. data/lib/feelin/js/node_modules/luxon/src/errors.js +61 -0
  73. data/lib/feelin/js/node_modules/luxon/src/impl/conversions.js +206 -0
  74. data/lib/feelin/js/node_modules/luxon/src/impl/diff.js +95 -0
  75. data/lib/feelin/js/node_modules/luxon/src/impl/digits.js +90 -0
  76. data/lib/feelin/js/node_modules/luxon/src/impl/english.js +233 -0
  77. data/lib/feelin/js/node_modules/luxon/src/impl/formats.js +176 -0
  78. data/lib/feelin/js/node_modules/luxon/src/impl/formatter.js +409 -0
  79. data/lib/feelin/js/node_modules/luxon/src/impl/invalid.js +14 -0
  80. data/lib/feelin/js/node_modules/luxon/src/impl/locale.js +554 -0
  81. data/lib/feelin/js/node_modules/luxon/src/impl/regexParser.js +335 -0
  82. data/lib/feelin/js/node_modules/luxon/src/impl/tokenParser.js +505 -0
  83. data/lib/feelin/js/node_modules/luxon/src/impl/util.js +316 -0
  84. data/lib/feelin/js/node_modules/luxon/src/impl/zoneUtil.js +34 -0
  85. data/lib/feelin/js/node_modules/luxon/src/info.js +205 -0
  86. data/lib/feelin/js/node_modules/luxon/src/interval.js +665 -0
  87. data/lib/feelin/js/node_modules/luxon/src/luxon.js +26 -0
  88. data/lib/feelin/js/node_modules/luxon/src/package.json +4 -0
  89. data/lib/feelin/js/node_modules/luxon/src/settings.js +180 -0
  90. data/lib/feelin/js/node_modules/luxon/src/zone.js +97 -0
  91. data/lib/feelin/js/node_modules/luxon/src/zones/IANAZone.js +231 -0
  92. data/lib/feelin/js/node_modules/luxon/src/zones/fixedOffsetZone.js +150 -0
  93. data/lib/feelin/js/node_modules/luxon/src/zones/invalidZone.js +53 -0
  94. data/lib/feelin/js/node_modules/luxon/src/zones/systemZone.js +61 -0
  95. data/lib/feelin/js/node_modules/min-dash/LICENSE +21 -0
  96. data/lib/feelin/js/node_modules/min-dash/README.md +38 -0
  97. data/lib/feelin/js/node_modules/min-dash/dist/array.d.ts +12 -0
  98. data/lib/feelin/js/node_modules/min-dash/dist/collection.d.ts +174 -0
  99. data/lib/feelin/js/node_modules/min-dash/dist/fn.d.ts +37 -0
  100. data/lib/feelin/js/node_modules/min-dash/dist/index.cjs +910 -0
  101. data/lib/feelin/js/node_modules/min-dash/dist/index.d.ts +5 -0
  102. data/lib/feelin/js/node_modules/min-dash/dist/index.esm.js +872 -0
  103. data/lib/feelin/js/node_modules/min-dash/dist/lang.d.ts +29 -0
  104. data/lib/feelin/js/node_modules/min-dash/dist/min-dash.js +916 -0
  105. data/lib/feelin/js/node_modules/min-dash/dist/min-dash.min.js +1 -0
  106. data/lib/feelin/js/node_modules/min-dash/dist/object.d.ts +112 -0
  107. data/lib/feelin/js/node_modules/min-dash/package.json +72 -0
  108. data/lib/feelin/js/package-lock.json +72 -0
  109. data/lib/feelin/js/package.json +5 -0
  110. data/lib/feelin/version.rb +3 -0
  111. data/lib/feelin.rb +63 -0
  112. data/spec/feelin/feelin_spec.rb +38 -0
  113. data/spec/spec_helper.rb +2 -0
  114. metadata +198 -0
@@ -0,0 +1,623 @@
1
+ import * as _lezer_common from '@lezer/common';
2
+ import { NodeType, Tree, SyntaxNodeRef } from '@lezer/common';
3
+
4
+ /**
5
+ Highlighting tags are markers that denote a highlighting category.
6
+ They are [associated](#highlight.styleTags) with parts of a syntax
7
+ tree by a language mode, and then mapped to an actual CSS style by
8
+ a [highlighter](#highlight.Highlighter).
9
+
10
+ Because syntax tree node types and highlight styles have to be
11
+ able to talk the same language, CodeMirror uses a mostly _closed_
12
+ [vocabulary](#highlight.tags) of syntax tags (as opposed to
13
+ traditional open string-based systems, which make it hard for
14
+ highlighting themes to cover all the tokens produced by the
15
+ various languages).
16
+
17
+ It _is_ possible to [define](#highlight.Tag^define) your own
18
+ highlighting tags for system-internal use (where you control both
19
+ the language package and the highlighter), but such tags will not
20
+ be picked up by regular highlighters (though you can derive them
21
+ from standard tags to allow highlighters to fall back to those).
22
+ */
23
+ declare class Tag {
24
+ /**
25
+ The set of this tag and all its parent tags, starting with
26
+ this one itself and sorted in order of decreasing specificity.
27
+ */
28
+ readonly set: Tag[];
29
+ toString(): string;
30
+ /**
31
+ Define a new tag. If `parent` is given, the tag is treated as a
32
+ sub-tag of that parent, and
33
+ [highlighters](#highlight.tagHighlighter) that don't mention
34
+ this tag will try to fall back to the parent tag (or grandparent
35
+ tag, etc).
36
+ */
37
+ static define(name?: string, parent?: Tag): Tag;
38
+ static define(parent?: Tag): Tag;
39
+ /**
40
+ Define a tag _modifier_, which is a function that, given a tag,
41
+ will return a tag that is a subtag of the original. Applying the
42
+ same modifier to a twice tag will return the same value (`m1(t1)
43
+ == m1(t1)`) and applying multiple modifiers will, regardless or
44
+ order, produce the same tag (`m1(m2(t1)) == m2(m1(t1))`).
45
+
46
+ When multiple modifiers are applied to a given base tag, each
47
+ smaller set of modifiers is registered as a parent, so that for
48
+ example `m1(m2(m3(t1)))` is a subtype of `m1(m2(t1))`,
49
+ `m1(m3(t1)`, and so on.
50
+ */
51
+ static defineModifier(name?: string): (tag: Tag) => Tag;
52
+ }
53
+ /**
54
+ This function is used to add a set of tags to a language syntax
55
+ via [`NodeSet.extend`](#common.NodeSet.extend) or
56
+ [`LRParser.configure`](#lr.LRParser.configure).
57
+
58
+ The argument object maps node selectors to [highlighting
59
+ tags](#highlight.Tag) or arrays of tags.
60
+
61
+ Node selectors may hold one or more (space-separated) node paths.
62
+ Such a path can be a [node name](#common.NodeType.name), or
63
+ multiple node names (or `*` wildcards) separated by slash
64
+ characters, as in `"Block/Declaration/VariableName"`. Such a path
65
+ matches the final node but only if its direct parent nodes are the
66
+ other nodes mentioned. A `*` in such a path matches any parent,
67
+ but only a single level—wildcards that match multiple parents
68
+ aren't supported, both for efficiency reasons and because Lezer
69
+ trees make it rather hard to reason about what they would match.)
70
+
71
+ A path can be ended with `/...` to indicate that the tag assigned
72
+ to the node should also apply to all child nodes, even if they
73
+ match their own style (by default, only the innermost style is
74
+ used).
75
+
76
+ When a path ends in `!`, as in `Attribute!`, no further matching
77
+ happens for the node's child nodes, and the entire node gets the
78
+ given style.
79
+
80
+ In this notation, node names that contain `/`, `!`, `*`, or `...`
81
+ must be quoted as JSON strings.
82
+
83
+ For example:
84
+
85
+ ```javascript
86
+ parser.withProps(
87
+ styleTags({
88
+ // Style Number and BigNumber nodes
89
+ "Number BigNumber": tags.number,
90
+ // Style Escape nodes whose parent is String
91
+ "String/Escape": tags.escape,
92
+ // Style anything inside Attributes nodes
93
+ "Attributes!": tags.meta,
94
+ // Add a style to all content inside Italic nodes
95
+ "Italic/...": tags.emphasis,
96
+ // Style InvalidString nodes as both `string` and `invalid`
97
+ "InvalidString": [tags.string, tags.invalid],
98
+ // Style the node named "/" as punctuation
99
+ '"/"': tags.punctuation
100
+ })
101
+ )
102
+ ```
103
+ */
104
+ declare function styleTags(spec: {
105
+ [selector: string]: Tag | readonly Tag[];
106
+ }): _lezer_common.NodePropSource;
107
+ /**
108
+ A highlighter defines a mapping from highlighting tags and
109
+ language scopes to CSS class names. They are usually defined via
110
+ [`tagHighlighter`](#highlight.tagHighlighter) or some wrapper
111
+ around that, but it is also possible to implement them from
112
+ scratch.
113
+ */
114
+ interface Highlighter {
115
+ /**
116
+ Get the set of classes that should be applied to the given set
117
+ of highlighting tags, or null if this highlighter doesn't assign
118
+ a style to the tags.
119
+ */
120
+ style(tags: readonly Tag[]): string | null;
121
+ /**
122
+ When given, the highlighter will only be applied to trees on
123
+ whose [top](#common.NodeType.isTop) node this predicate returns
124
+ true.
125
+ */
126
+ scope?(node: NodeType): boolean;
127
+ }
128
+ /**
129
+ Define a [highlighter](#highlight.Highlighter) from an array of
130
+ tag/class pairs. Classes associated with more specific tags will
131
+ take precedence.
132
+ */
133
+ declare function tagHighlighter(tags: readonly {
134
+ tag: Tag | readonly Tag[];
135
+ class: string;
136
+ }[], options?: {
137
+ /**
138
+ By default, highlighters apply to the entire document. You can
139
+ scope them to a single language by providing the tree's
140
+ [top](#common.NodeType.isTop) node type here.
141
+ */
142
+ scope?: (node: NodeType) => boolean;
143
+ /**
144
+ Add a style to _all_ tokens. Probably only useful in combination
145
+ with `scope`.
146
+ */
147
+ all?: string;
148
+ }): Highlighter;
149
+ /**
150
+ Highlight the given [tree](#common.Tree) with the given
151
+ [highlighter](#highlight.Highlighter). Often, the higher-level
152
+ [`highlightCode`](#highlight.highlightCode) function is easier to
153
+ use.
154
+ */
155
+ declare function highlightTree(tree: Tree, highlighter: Highlighter | readonly Highlighter[],
156
+ /**
157
+ Assign styling to a region of the text. Will be called, in order
158
+ of position, for any ranges where more than zero classes apply.
159
+ `classes` is a space separated string of CSS classes.
160
+ */
161
+ putStyle: (from: number, to: number, classes: string) => void,
162
+ /**
163
+ The start of the range to highlight.
164
+ */
165
+ from?: number,
166
+ /**
167
+ The end of the range.
168
+ */
169
+ to?: number): void;
170
+ /**
171
+ Highlight the given tree with the given highlighter, calling
172
+ `putText` for every piece of text, either with a set of classes or
173
+ with the empty string when unstyled, and `putBreak` for every line
174
+ break.
175
+ */
176
+ declare function highlightCode(code: string, tree: Tree, highlighter: Highlighter | readonly Highlighter[], putText: (code: string, classes: string) => void, putBreak: () => void, from?: number, to?: number): void;
177
+ /**
178
+ Match a syntax node's [highlight rules](#highlight.styleTags). If
179
+ there's a match, return its set of tags, and whether it is
180
+ opaque (uses a `!`) or applies to all child nodes (`/...`).
181
+ */
182
+ declare function getStyleTags(node: SyntaxNodeRef): {
183
+ tags: readonly Tag[];
184
+ opaque: boolean;
185
+ inherit: boolean;
186
+ } | null;
187
+ /**
188
+ The default set of highlighting [tags](#highlight.Tag).
189
+
190
+ This collection is heavily biased towards programming languages,
191
+ and necessarily incomplete. A full ontology of syntactic
192
+ constructs would fill a stack of books, and be impractical to
193
+ write themes for. So try to make do with this set. If all else
194
+ fails, [open an
195
+ issue](https://github.com/codemirror/codemirror.next) to propose a
196
+ new tag, or [define](#highlight.Tag^define) a local custom tag for
197
+ your use case.
198
+
199
+ Note that it is not obligatory to always attach the most specific
200
+ tag possible to an element—if your grammar can't easily
201
+ distinguish a certain type of element (such as a local variable),
202
+ it is okay to style it as its more general variant (a variable).
203
+
204
+ For tags that extend some parent tag, the documentation links to
205
+ the parent.
206
+ */
207
+ declare const tags: {
208
+ /**
209
+ A comment.
210
+ */
211
+ comment: Tag;
212
+ /**
213
+ A line [comment](#highlight.tags.comment).
214
+ */
215
+ lineComment: Tag;
216
+ /**
217
+ A block [comment](#highlight.tags.comment).
218
+ */
219
+ blockComment: Tag;
220
+ /**
221
+ A documentation [comment](#highlight.tags.comment).
222
+ */
223
+ docComment: Tag;
224
+ /**
225
+ Any kind of identifier.
226
+ */
227
+ name: Tag;
228
+ /**
229
+ The [name](#highlight.tags.name) of a variable.
230
+ */
231
+ variableName: Tag;
232
+ /**
233
+ A type [name](#highlight.tags.name).
234
+ */
235
+ typeName: Tag;
236
+ /**
237
+ A tag name (subtag of [`typeName`](#highlight.tags.typeName)).
238
+ */
239
+ tagName: Tag;
240
+ /**
241
+ A property or field [name](#highlight.tags.name).
242
+ */
243
+ propertyName: Tag;
244
+ /**
245
+ An attribute name (subtag of [`propertyName`](#highlight.tags.propertyName)).
246
+ */
247
+ attributeName: Tag;
248
+ /**
249
+ The [name](#highlight.tags.name) of a class.
250
+ */
251
+ className: Tag;
252
+ /**
253
+ A label [name](#highlight.tags.name).
254
+ */
255
+ labelName: Tag;
256
+ /**
257
+ A namespace [name](#highlight.tags.name).
258
+ */
259
+ namespace: Tag;
260
+ /**
261
+ The [name](#highlight.tags.name) of a macro.
262
+ */
263
+ macroName: Tag;
264
+ /**
265
+ A literal value.
266
+ */
267
+ literal: Tag;
268
+ /**
269
+ A string [literal](#highlight.tags.literal).
270
+ */
271
+ string: Tag;
272
+ /**
273
+ A documentation [string](#highlight.tags.string).
274
+ */
275
+ docString: Tag;
276
+ /**
277
+ A character literal (subtag of [string](#highlight.tags.string)).
278
+ */
279
+ character: Tag;
280
+ /**
281
+ An attribute value (subtag of [string](#highlight.tags.string)).
282
+ */
283
+ attributeValue: Tag;
284
+ /**
285
+ A number [literal](#highlight.tags.literal).
286
+ */
287
+ number: Tag;
288
+ /**
289
+ An integer [number](#highlight.tags.number) literal.
290
+ */
291
+ integer: Tag;
292
+ /**
293
+ A floating-point [number](#highlight.tags.number) literal.
294
+ */
295
+ float: Tag;
296
+ /**
297
+ A boolean [literal](#highlight.tags.literal).
298
+ */
299
+ bool: Tag;
300
+ /**
301
+ Regular expression [literal](#highlight.tags.literal).
302
+ */
303
+ regexp: Tag;
304
+ /**
305
+ An escape [literal](#highlight.tags.literal), for example a
306
+ backslash escape in a string.
307
+ */
308
+ escape: Tag;
309
+ /**
310
+ A color [literal](#highlight.tags.literal).
311
+ */
312
+ color: Tag;
313
+ /**
314
+ A URL [literal](#highlight.tags.literal).
315
+ */
316
+ url: Tag;
317
+ /**
318
+ A language keyword.
319
+ */
320
+ keyword: Tag;
321
+ /**
322
+ The [keyword](#highlight.tags.keyword) for the self or this
323
+ object.
324
+ */
325
+ self: Tag;
326
+ /**
327
+ The [keyword](#highlight.tags.keyword) for null.
328
+ */
329
+ null: Tag;
330
+ /**
331
+ A [keyword](#highlight.tags.keyword) denoting some atomic value.
332
+ */
333
+ atom: Tag;
334
+ /**
335
+ A [keyword](#highlight.tags.keyword) that represents a unit.
336
+ */
337
+ unit: Tag;
338
+ /**
339
+ A modifier [keyword](#highlight.tags.keyword).
340
+ */
341
+ modifier: Tag;
342
+ /**
343
+ A [keyword](#highlight.tags.keyword) that acts as an operator.
344
+ */
345
+ operatorKeyword: Tag;
346
+ /**
347
+ A control-flow related [keyword](#highlight.tags.keyword).
348
+ */
349
+ controlKeyword: Tag;
350
+ /**
351
+ A [keyword](#highlight.tags.keyword) that defines something.
352
+ */
353
+ definitionKeyword: Tag;
354
+ /**
355
+ A [keyword](#highlight.tags.keyword) related to defining or
356
+ interfacing with modules.
357
+ */
358
+ moduleKeyword: Tag;
359
+ /**
360
+ An operator.
361
+ */
362
+ operator: Tag;
363
+ /**
364
+ An [operator](#highlight.tags.operator) that dereferences something.
365
+ */
366
+ derefOperator: Tag;
367
+ /**
368
+ Arithmetic-related [operator](#highlight.tags.operator).
369
+ */
370
+ arithmeticOperator: Tag;
371
+ /**
372
+ Logical [operator](#highlight.tags.operator).
373
+ */
374
+ logicOperator: Tag;
375
+ /**
376
+ Bit [operator](#highlight.tags.operator).
377
+ */
378
+ bitwiseOperator: Tag;
379
+ /**
380
+ Comparison [operator](#highlight.tags.operator).
381
+ */
382
+ compareOperator: Tag;
383
+ /**
384
+ [Operator](#highlight.tags.operator) that updates its operand.
385
+ */
386
+ updateOperator: Tag;
387
+ /**
388
+ [Operator](#highlight.tags.operator) that defines something.
389
+ */
390
+ definitionOperator: Tag;
391
+ /**
392
+ Type-related [operator](#highlight.tags.operator).
393
+ */
394
+ typeOperator: Tag;
395
+ /**
396
+ Control-flow [operator](#highlight.tags.operator).
397
+ */
398
+ controlOperator: Tag;
399
+ /**
400
+ Program or markup punctuation.
401
+ */
402
+ punctuation: Tag;
403
+ /**
404
+ [Punctuation](#highlight.tags.punctuation) that separates
405
+ things.
406
+ */
407
+ separator: Tag;
408
+ /**
409
+ Bracket-style [punctuation](#highlight.tags.punctuation).
410
+ */
411
+ bracket: Tag;
412
+ /**
413
+ Angle [brackets](#highlight.tags.bracket) (usually `<` and `>`
414
+ tokens).
415
+ */
416
+ angleBracket: Tag;
417
+ /**
418
+ Square [brackets](#highlight.tags.bracket) (usually `[` and `]`
419
+ tokens).
420
+ */
421
+ squareBracket: Tag;
422
+ /**
423
+ Parentheses (usually `(` and `)` tokens). Subtag of
424
+ [bracket](#highlight.tags.bracket).
425
+ */
426
+ paren: Tag;
427
+ /**
428
+ Braces (usually `{` and `}` tokens). Subtag of
429
+ [bracket](#highlight.tags.bracket).
430
+ */
431
+ brace: Tag;
432
+ /**
433
+ Content, for example plain text in XML or markup documents.
434
+ */
435
+ content: Tag;
436
+ /**
437
+ [Content](#highlight.tags.content) that represents a heading.
438
+ */
439
+ heading: Tag;
440
+ /**
441
+ A level 1 [heading](#highlight.tags.heading).
442
+ */
443
+ heading1: Tag;
444
+ /**
445
+ A level 2 [heading](#highlight.tags.heading).
446
+ */
447
+ heading2: Tag;
448
+ /**
449
+ A level 3 [heading](#highlight.tags.heading).
450
+ */
451
+ heading3: Tag;
452
+ /**
453
+ A level 4 [heading](#highlight.tags.heading).
454
+ */
455
+ heading4: Tag;
456
+ /**
457
+ A level 5 [heading](#highlight.tags.heading).
458
+ */
459
+ heading5: Tag;
460
+ /**
461
+ A level 6 [heading](#highlight.tags.heading).
462
+ */
463
+ heading6: Tag;
464
+ /**
465
+ A prose [content](#highlight.tags.content) separator (such as a horizontal rule).
466
+ */
467
+ contentSeparator: Tag;
468
+ /**
469
+ [Content](#highlight.tags.content) that represents a list.
470
+ */
471
+ list: Tag;
472
+ /**
473
+ [Content](#highlight.tags.content) that represents a quote.
474
+ */
475
+ quote: Tag;
476
+ /**
477
+ [Content](#highlight.tags.content) that is emphasized.
478
+ */
479
+ emphasis: Tag;
480
+ /**
481
+ [Content](#highlight.tags.content) that is styled strong.
482
+ */
483
+ strong: Tag;
484
+ /**
485
+ [Content](#highlight.tags.content) that is part of a link.
486
+ */
487
+ link: Tag;
488
+ /**
489
+ [Content](#highlight.tags.content) that is styled as code or
490
+ monospace.
491
+ */
492
+ monospace: Tag;
493
+ /**
494
+ [Content](#highlight.tags.content) that has a strike-through
495
+ style.
496
+ */
497
+ strikethrough: Tag;
498
+ /**
499
+ Inserted text in a change-tracking format.
500
+ */
501
+ inserted: Tag;
502
+ /**
503
+ Deleted text.
504
+ */
505
+ deleted: Tag;
506
+ /**
507
+ Changed text.
508
+ */
509
+ changed: Tag;
510
+ /**
511
+ An invalid or unsyntactic element.
512
+ */
513
+ invalid: Tag;
514
+ /**
515
+ Metadata or meta-instruction.
516
+ */
517
+ meta: Tag;
518
+ /**
519
+ [Metadata](#highlight.tags.meta) that applies to the entire
520
+ document.
521
+ */
522
+ documentMeta: Tag;
523
+ /**
524
+ [Metadata](#highlight.tags.meta) that annotates or adds
525
+ attributes to a given syntactic element.
526
+ */
527
+ annotation: Tag;
528
+ /**
529
+ Processing instruction or preprocessor directive. Subtag of
530
+ [meta](#highlight.tags.meta).
531
+ */
532
+ processingInstruction: Tag;
533
+ /**
534
+ [Modifier](#highlight.Tag^defineModifier) that indicates that a
535
+ given element is being defined. Expected to be used with the
536
+ various [name](#highlight.tags.name) tags.
537
+ */
538
+ definition: (tag: Tag) => Tag;
539
+ /**
540
+ [Modifier](#highlight.Tag^defineModifier) that indicates that
541
+ something is constant. Mostly expected to be used with
542
+ [variable names](#highlight.tags.variableName).
543
+ */
544
+ constant: (tag: Tag) => Tag;
545
+ /**
546
+ [Modifier](#highlight.Tag^defineModifier) used to indicate that
547
+ a [variable](#highlight.tags.variableName) or [property
548
+ name](#highlight.tags.propertyName) is being called or defined
549
+ as a function.
550
+ */
551
+ function: (tag: Tag) => Tag;
552
+ /**
553
+ [Modifier](#highlight.Tag^defineModifier) that can be applied to
554
+ [names](#highlight.tags.name) to indicate that they belong to
555
+ the language's standard environment.
556
+ */
557
+ standard: (tag: Tag) => Tag;
558
+ /**
559
+ [Modifier](#highlight.Tag^defineModifier) that indicates a given
560
+ [names](#highlight.tags.name) is local to some scope.
561
+ */
562
+ local: (tag: Tag) => Tag;
563
+ /**
564
+ A generic variant [modifier](#highlight.Tag^defineModifier) that
565
+ can be used to tag language-specific alternative variants of
566
+ some common tag. It is recommended for themes to define special
567
+ forms of at least the [string](#highlight.tags.string) and
568
+ [variable name](#highlight.tags.variableName) tags, since those
569
+ come up a lot.
570
+ */
571
+ special: (tag: Tag) => Tag;
572
+ };
573
+ /**
574
+ This is a highlighter that adds stable, predictable classes to
575
+ tokens, for styling with external CSS.
576
+
577
+ The following tags are mapped to their name prefixed with `"tok-"`
578
+ (for example `"tok-comment"`):
579
+
580
+ * [`link`](#highlight.tags.link)
581
+ * [`heading`](#highlight.tags.heading)
582
+ * [`emphasis`](#highlight.tags.emphasis)
583
+ * [`strong`](#highlight.tags.strong)
584
+ * [`keyword`](#highlight.tags.keyword)
585
+ * [`atom`](#highlight.tags.atom)
586
+ * [`bool`](#highlight.tags.bool)
587
+ * [`url`](#highlight.tags.url)
588
+ * [`labelName`](#highlight.tags.labelName)
589
+ * [`inserted`](#highlight.tags.inserted)
590
+ * [`deleted`](#highlight.tags.deleted)
591
+ * [`literal`](#highlight.tags.literal)
592
+ * [`string`](#highlight.tags.string)
593
+ * [`number`](#highlight.tags.number)
594
+ * [`variableName`](#highlight.tags.variableName)
595
+ * [`typeName`](#highlight.tags.typeName)
596
+ * [`namespace`](#highlight.tags.namespace)
597
+ * [`className`](#highlight.tags.className)
598
+ * [`macroName`](#highlight.tags.macroName)
599
+ * [`propertyName`](#highlight.tags.propertyName)
600
+ * [`operator`](#highlight.tags.operator)
601
+ * [`comment`](#highlight.tags.comment)
602
+ * [`meta`](#highlight.tags.meta)
603
+ * [`punctuation`](#highlight.tags.punctuation)
604
+ * [`invalid`](#highlight.tags.invalid)
605
+
606
+ In addition, these mappings are provided:
607
+
608
+ * [`regexp`](#highlight.tags.regexp),
609
+ [`escape`](#highlight.tags.escape), and
610
+ [`special`](#highlight.tags.special)[`(string)`](#highlight.tags.string)
611
+ are mapped to `"tok-string2"`
612
+ * [`special`](#highlight.tags.special)[`(variableName)`](#highlight.tags.variableName)
613
+ to `"tok-variableName2"`
614
+ * [`local`](#highlight.tags.local)[`(variableName)`](#highlight.tags.variableName)
615
+ to `"tok-variableName tok-local"`
616
+ * [`definition`](#highlight.tags.definition)[`(variableName)`](#highlight.tags.variableName)
617
+ to `"tok-variableName tok-definition"`
618
+ * [`definition`](#highlight.tags.definition)[`(propertyName)`](#highlight.tags.propertyName)
619
+ to `"tok-propertyName tok-definition"`
620
+ */
621
+ declare const classHighlighter: Highlighter;
622
+
623
+ export { Highlighter, Tag, classHighlighter, getStyleTags, highlightCode, highlightTree, styleTags, tagHighlighter, tags };