@renovatebot/good-enough-parser 1.1.24 → 2.0.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.
- package/README.md +6 -6
- package/dist/cjs/index.d.ts +4 -4
- package/dist/cjs/index.js +7 -7
- package/dist/cjs/lang/groovy.d.ts +6 -6
- package/dist/cjs/lang/groovy.js +83 -83
- package/dist/cjs/lang/index.d.ts +20 -20
- package/dist/cjs/lang/index.js +56 -56
- package/dist/cjs/lang/index.js.map +1 -1
- package/dist/cjs/lang/python.d.ts +6 -6
- package/dist/cjs/lang/python.js +73 -73
- package/dist/cjs/lang/scala.d.ts +6 -6
- package/dist/cjs/lang/scala.js +71 -71
- package/dist/cjs/lang/starlark.d.ts +6 -6
- package/dist/cjs/lang/starlark.js +58 -58
- package/dist/cjs/lang/types.d.ts +6 -6
- package/dist/cjs/lang/types.js +2 -2
- package/dist/cjs/lexer/bracket.d.ts +6 -6
- package/dist/cjs/lexer/bracket.js +56 -57
- package/dist/cjs/lexer/bracket.js.map +1 -1
- package/dist/cjs/lexer/comment.d.ts +3 -3
- package/dist/cjs/lexer/comment.js +43 -44
- package/dist/cjs/lexer/comment.js.map +1 -1
- package/dist/cjs/lexer/index.d.ts +5 -5
- package/dist/cjs/lexer/index.js +154 -155
- package/dist/cjs/lexer/index.js.map +1 -1
- package/dist/cjs/lexer/number.d.ts +2 -2
- package/dist/cjs/lexer/number.js +17 -18
- package/dist/cjs/lexer/number.js.map +1 -1
- package/dist/cjs/lexer/operator.d.ts +2 -2
- package/dist/cjs/lexer/operator.js +23 -24
- package/dist/cjs/lexer/operator.js.map +1 -1
- package/dist/cjs/lexer/rules.d.ts +4 -4
- package/dist/cjs/lexer/rules.js +74 -74
- package/dist/cjs/lexer/rules.js.map +1 -1
- package/dist/cjs/lexer/string.d.ts +2 -2
- package/dist/cjs/lexer/string.js +180 -181
- package/dist/cjs/lexer/string.js.map +1 -1
- package/dist/cjs/lexer/symbol.d.ts +2 -2
- package/dist/cjs/lexer/symbol.js +17 -18
- package/dist/cjs/lexer/symbol.js.map +1 -1
- package/dist/cjs/lexer/token.d.ts +3 -3
- package/dist/cjs/lexer/token.js +63 -64
- package/dist/cjs/lexer/token.js.map +1 -1
- package/dist/cjs/lexer/types.d.ts +142 -142
- package/dist/cjs/lexer/types.js +2 -2
- package/dist/cjs/parser/cursor.d.ts +2 -2
- package/dist/cjs/parser/cursor.js +12 -13
- package/dist/cjs/parser/cursor.js.map +1 -1
- package/dist/cjs/parser/index.d.ts +3 -3
- package/dist/cjs/parser/index.js +19 -19
- package/dist/cjs/parser/tree.d.ts +4 -4
- package/dist/cjs/parser/tree.js +245 -246
- package/dist/cjs/parser/tree.js.map +1 -1
- package/dist/cjs/parser/types.d.ts +33 -33
- package/dist/cjs/parser/types.js +2 -2
- package/dist/cjs/query/builder.d.ts +144 -144
- package/dist/cjs/query/builder.d.ts.map +1 -1
- package/dist/cjs/query/builder.js +333 -332
- package/dist/cjs/query/builder.js.map +1 -1
- package/dist/cjs/query/handler.d.ts +2 -2
- package/dist/cjs/query/handler.js +9 -10
- package/dist/cjs/query/handler.js.map +1 -1
- package/dist/cjs/query/index.d.ts +2 -2
- package/dist/cjs/query/index.js +32 -32
- package/dist/cjs/query/matchers/abstract-matcher.d.ts +9 -9
- package/dist/cjs/query/matchers/abstract-matcher.js +36 -36
- package/dist/cjs/query/matchers/abstract-matcher.js.map +1 -1
- package/dist/cjs/query/matchers/alt-matcher.d.ts +10 -10
- package/dist/cjs/query/matchers/alt-matcher.js +33 -33
- package/dist/cjs/query/matchers/alt-matcher.js.map +1 -1
- package/dist/cjs/query/matchers/anchor-matcher.d.ts +17 -17
- package/dist/cjs/query/matchers/anchor-matcher.js +50 -50
- package/dist/cjs/query/matchers/anchor-matcher.js.map +1 -1
- package/dist/cjs/query/matchers/comment-matcher.d.ts +10 -10
- package/dist/cjs/query/matchers/comment-matcher.js +39 -39
- package/dist/cjs/query/matchers/comment-matcher.js.map +1 -1
- package/dist/cjs/query/matchers/index.d.ts +6 -6
- package/dist/cjs/query/matchers/index.js +22 -22
- package/dist/cjs/query/matchers/many-matcher.d.ts +13 -13
- package/dist/cjs/query/matchers/many-matcher.js +61 -61
- package/dist/cjs/query/matchers/many-matcher.js.map +1 -1
- package/dist/cjs/query/matchers/num-matcher.d.ts +8 -8
- package/dist/cjs/query/matchers/num-matcher.js +34 -34
- package/dist/cjs/query/matchers/num-matcher.js.map +1 -1
- package/dist/cjs/query/matchers/op-matcher.d.ts +8 -8
- package/dist/cjs/query/matchers/op-matcher.js +34 -34
- package/dist/cjs/query/matchers/op-matcher.js.map +1 -1
- package/dist/cjs/query/matchers/seq-matcher.d.ts +14 -14
- package/dist/cjs/query/matchers/seq-matcher.js +76 -76
- package/dist/cjs/query/matchers/seq-matcher.js.map +1 -1
- package/dist/cjs/query/matchers/str-matcher.d.ts +38 -38
- package/dist/cjs/query/matchers/str-matcher.js +108 -108
- package/dist/cjs/query/matchers/str-matcher.js.map +1 -1
- package/dist/cjs/query/matchers/sym-matcher.d.ts +8 -8
- package/dist/cjs/query/matchers/sym-matcher.js +34 -34
- package/dist/cjs/query/matchers/sym-matcher.js.map +1 -1
- package/dist/cjs/query/matchers/tree-matcher.d.ts +23 -23
- package/dist/cjs/query/matchers/tree-matcher.js +121 -121
- package/dist/cjs/query/matchers/tree-matcher.js.map +1 -1
- package/dist/cjs/query/options.d.ts +10 -10
- package/dist/cjs/query/options.js +148 -149
- package/dist/cjs/query/options.js.map +1 -1
- package/dist/cjs/query/regex.d.ts +1 -1
- package/dist/cjs/query/regex.js +12 -13
- package/dist/cjs/query/regex.js.map +1 -1
- package/dist/cjs/query/types.d.ts +100 -100
- package/dist/cjs/query/types.d.ts.map +1 -1
- package/dist/cjs/query/types.js +2 -2
- package/dist/cjs/util/clone.d.ts +1 -1
- package/dist/cjs/util/clone.js +5 -5
- package/dist/cjs/util/regex.d.ts +1 -1
- package/dist/cjs/util/regex.js +6 -7
- package/dist/cjs/util/regex.js.map +1 -1
- package/dist/esm/index.d.ts +4 -4
- package/dist/esm/index.js +8 -8
- package/dist/esm/lang/groovy.d.ts +6 -6
- package/dist/esm/lang/groovy.js +80 -80
- package/dist/esm/lang/index.d.ts +20 -20
- package/dist/esm/lang/index.js +37 -37
- package/dist/esm/lang/python.d.ts +6 -6
- package/dist/esm/lang/python.js +70 -70
- package/dist/esm/lang/scala.d.ts +6 -6
- package/dist/esm/lang/scala.js +68 -68
- package/dist/esm/lang/starlark.d.ts +6 -6
- package/dist/esm/lang/starlark.js +55 -55
- package/dist/esm/lang/types.d.ts +6 -6
- package/dist/esm/lang/types.js +1 -1
- package/dist/esm/lexer/bracket.d.ts +6 -6
- package/dist/esm/lexer/bracket.js +49 -49
- package/dist/esm/lexer/bracket.js.map +1 -1
- package/dist/esm/lexer/comment.d.ts +3 -3
- package/dist/esm/lexer/comment.js +39 -39
- package/dist/esm/lexer/comment.js.map +1 -1
- package/dist/esm/lexer/index.d.ts +5 -5
- package/dist/esm/lexer/index.js +136 -136
- package/dist/esm/lexer/index.js.map +1 -1
- package/dist/esm/lexer/number.d.ts +2 -2
- package/dist/esm/lexer/number.js +14 -14
- package/dist/esm/lexer/operator.d.ts +2 -2
- package/dist/esm/lexer/operator.js +20 -20
- package/dist/esm/lexer/rules.d.ts +4 -4
- package/dist/esm/lexer/rules.js +69 -69
- package/dist/esm/lexer/rules.js.map +1 -1
- package/dist/esm/lexer/string.d.ts +2 -2
- package/dist/esm/lexer/string.js +177 -177
- package/dist/esm/lexer/string.js.map +1 -1
- package/dist/esm/lexer/symbol.d.ts +2 -2
- package/dist/esm/lexer/symbol.js +14 -14
- package/dist/esm/lexer/token.d.ts +3 -3
- package/dist/esm/lexer/token.js +60 -60
- package/dist/esm/lexer/token.js.map +1 -1
- package/dist/esm/lexer/types.d.ts +142 -142
- package/dist/esm/lexer/types.js +1 -1
- package/dist/esm/parser/cursor.d.ts +2 -2
- package/dist/esm/parser/cursor.js +9 -9
- package/dist/esm/parser/index.d.ts +3 -3
- package/dist/esm/parser/index.js +3 -3
- package/dist/esm/parser/tree.d.ts +4 -4
- package/dist/esm/parser/tree.js +241 -241
- package/dist/esm/parser/tree.js.map +1 -1
- package/dist/esm/parser/types.d.ts +33 -33
- package/dist/esm/parser/types.js +1 -1
- package/dist/esm/query/builder.d.ts +144 -144
- package/dist/esm/query/builder.d.ts.map +1 -1
- package/dist/esm/query/builder.js +305 -304
- package/dist/esm/query/builder.js.map +1 -1
- package/dist/esm/query/handler.d.ts +2 -2
- package/dist/esm/query/handler.js +6 -6
- package/dist/esm/query/index.d.ts +2 -2
- package/dist/esm/query/index.js +2 -2
- package/dist/esm/query/matchers/abstract-matcher.d.ts +9 -9
- package/dist/esm/query/matchers/abstract-matcher.js +32 -32
- package/dist/esm/query/matchers/abstract-matcher.js.map +1 -1
- package/dist/esm/query/matchers/alt-matcher.d.ts +10 -10
- package/dist/esm/query/matchers/alt-matcher.js +29 -29
- package/dist/esm/query/matchers/alt-matcher.js.map +1 -1
- package/dist/esm/query/matchers/anchor-matcher.d.ts +17 -17
- package/dist/esm/query/matchers/anchor-matcher.js +44 -44
- package/dist/esm/query/matchers/anchor-matcher.js.map +1 -1
- package/dist/esm/query/matchers/comment-matcher.d.ts +10 -10
- package/dist/esm/query/matchers/comment-matcher.js +35 -35
- package/dist/esm/query/matchers/comment-matcher.js.map +1 -1
- package/dist/esm/query/matchers/index.d.ts +6 -6
- package/dist/esm/query/matchers/index.js +6 -6
- package/dist/esm/query/matchers/many-matcher.d.ts +13 -13
- package/dist/esm/query/matchers/many-matcher.js +57 -57
- package/dist/esm/query/matchers/many-matcher.js.map +1 -1
- package/dist/esm/query/matchers/num-matcher.d.ts +8 -8
- package/dist/esm/query/matchers/num-matcher.js +30 -30
- package/dist/esm/query/matchers/num-matcher.js.map +1 -1
- package/dist/esm/query/matchers/op-matcher.d.ts +8 -8
- package/dist/esm/query/matchers/op-matcher.js +30 -30
- package/dist/esm/query/matchers/op-matcher.js.map +1 -1
- package/dist/esm/query/matchers/seq-matcher.d.ts +14 -14
- package/dist/esm/query/matchers/seq-matcher.js +72 -72
- package/dist/esm/query/matchers/seq-matcher.js.map +1 -1
- package/dist/esm/query/matchers/str-matcher.d.ts +38 -38
- package/dist/esm/query/matchers/str-matcher.js +102 -102
- package/dist/esm/query/matchers/str-matcher.js.map +1 -1
- package/dist/esm/query/matchers/sym-matcher.d.ts +8 -8
- package/dist/esm/query/matchers/sym-matcher.js +30 -30
- package/dist/esm/query/matchers/sym-matcher.js.map +1 -1
- package/dist/esm/query/matchers/tree-matcher.d.ts +23 -23
- package/dist/esm/query/matchers/tree-matcher.js +117 -117
- package/dist/esm/query/matchers/tree-matcher.js.map +1 -1
- package/dist/esm/query/options.d.ts +10 -10
- package/dist/esm/query/options.js +139 -139
- package/dist/esm/query/options.js.map +1 -1
- package/dist/esm/query/regex.d.ts +1 -1
- package/dist/esm/query/regex.js +9 -9
- package/dist/esm/query/regex.js.map +1 -1
- package/dist/esm/query/types.d.ts +100 -100
- package/dist/esm/query/types.d.ts.map +1 -1
- package/dist/esm/query/types.js +1 -1
- package/dist/esm/util/clone.d.ts +1 -1
- package/dist/esm/util/clone.js +1 -1
- package/dist/esm/util/regex.d.ts +1 -1
- package/dist/esm/util/regex.js +3 -3
- package/package.json +42 -46
package/dist/esm/lang/python.js
CHANGED
|
@@ -1,71 +1,71 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @see https://docs.python.org/3/reference/lexical_analysis.html#operators
|
|
3
|
-
*/
|
|
4
|
-
const operators =
|
|
5
|
-
/* prettier-ignore */ [
|
|
6
|
-
// Operators
|
|
7
|
-
'+', '-', '*', '**', '/', '//', '%', '@',
|
|
8
|
-
'<<', '>>', '&', '|', '^', '~', ':=',
|
|
9
|
-
'<', '>', '<=', '>=', '==', '!=',
|
|
10
|
-
// Delimiters
|
|
11
|
-
',', ':', '.', ';', '@', '=', '->',
|
|
12
|
-
'+=', '-=', '*=', '/=', '//=', '%=', '@=',
|
|
13
|
-
'&=', '|=', '^=', '>>=', '<<=', '**=',
|
|
14
|
-
];
|
|
15
|
-
/**
|
|
16
|
-
* @see https://docs.python.org/3/reference/lexical_analysis.html#numeric-literals
|
|
17
|
-
*/
|
|
18
|
-
const bindigit = '[01]';
|
|
19
|
-
const octdigit = '[0-7]';
|
|
20
|
-
const digit = '[0-9]';
|
|
21
|
-
const nonzerodigit = '[1-9]';
|
|
22
|
-
const hexdigit = `(?:${digit}|[a-fA-F])`;
|
|
23
|
-
const bininteger = `(?:0[bB](?:_?${bindigit})+)`;
|
|
24
|
-
const octinteger = `(?:0[oO](?:_?${octdigit})+)`;
|
|
25
|
-
const hexinteger = `(?:0[xX](?:_?${hexdigit})+)`;
|
|
26
|
-
const decinteger = `(?:${nonzerodigit}(?:_?${digit})*|0+(?:_?0)*)`;
|
|
27
|
-
const integer = `(?:${decinteger}|${bininteger}|${octinteger}|${hexinteger})`;
|
|
28
|
-
const digitpart = `(?:${digit}(?:_?${digit})*)`;
|
|
29
|
-
const fraction = `(?:\\.${digitpart})`;
|
|
30
|
-
const exponent = `(?:[eE][-+]?${digitpart})`;
|
|
31
|
-
const pointfloat = `(?:${digitpart}?${fraction}|${digitpart}\\.)`;
|
|
32
|
-
const exponentfloat = `(?:(?:${digitpart}|${pointfloat})${exponent})`;
|
|
33
|
-
const floatnumber = `(?:${pointfloat}|${exponentfloat})`;
|
|
34
|
-
const numbers = new RegExp(`(?:${integer}|${floatnumber})`);
|
|
35
|
-
export const lexer = {
|
|
36
|
-
joinLines: '\\',
|
|
37
|
-
comments: [{ type: 'line-comment', startsWith: '#' }],
|
|
38
|
-
symbols: /[_a-zA-Z][_a-zA-Z0-9]*/,
|
|
39
|
-
numbers,
|
|
40
|
-
operators,
|
|
41
|
-
brackets: [
|
|
42
|
-
{ startsWith: '{', endsWith: '}' },
|
|
43
|
-
{ startsWith: '[', endsWith: ']' },
|
|
44
|
-
{ startsWith: '(', endsWith: ')' },
|
|
45
|
-
],
|
|
46
|
-
strings: [
|
|
47
|
-
{ startsWith: "'", escapeChar: '\\' },
|
|
48
|
-
{ startsWith: '"', escapeChar: '\\' },
|
|
49
|
-
{ startsWith: "'''", escapeChar: '\\' },
|
|
50
|
-
{ startsWith: '"""', escapeChar: '\\' },
|
|
51
|
-
{
|
|
52
|
-
startsWith: "f'",
|
|
53
|
-
endsWith: "'",
|
|
54
|
-
escapeChar: '\\',
|
|
55
|
-
templates: [{ type: 'expr', startsWith: '{', endsWith: '}' }],
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
startsWith: 'f"',
|
|
59
|
-
endsWith: '"',
|
|
60
|
-
escapeChar: '\\',
|
|
61
|
-
templates: [{ type: 'expr', startsWith: '{', endsWith: '}' }],
|
|
62
|
-
},
|
|
63
|
-
{ startsWith: "r'", endsWith: "'" },
|
|
64
|
-
{ startsWith: 'r"', endsWith: '"' },
|
|
65
|
-
],
|
|
66
|
-
};
|
|
67
|
-
export const parser = {
|
|
68
|
-
useIndentBlocks: true,
|
|
69
|
-
};
|
|
70
|
-
export const lang = { lexer, parser };
|
|
1
|
+
/**
|
|
2
|
+
* @see https://docs.python.org/3/reference/lexical_analysis.html#operators
|
|
3
|
+
*/
|
|
4
|
+
const operators =
|
|
5
|
+
/* prettier-ignore */ [
|
|
6
|
+
// Operators
|
|
7
|
+
'+', '-', '*', '**', '/', '//', '%', '@',
|
|
8
|
+
'<<', '>>', '&', '|', '^', '~', ':=',
|
|
9
|
+
'<', '>', '<=', '>=', '==', '!=',
|
|
10
|
+
// Delimiters
|
|
11
|
+
',', ':', '.', ';', '@', '=', '->',
|
|
12
|
+
'+=', '-=', '*=', '/=', '//=', '%=', '@=',
|
|
13
|
+
'&=', '|=', '^=', '>>=', '<<=', '**=',
|
|
14
|
+
];
|
|
15
|
+
/**
|
|
16
|
+
* @see https://docs.python.org/3/reference/lexical_analysis.html#numeric-literals
|
|
17
|
+
*/
|
|
18
|
+
const bindigit = '[01]';
|
|
19
|
+
const octdigit = '[0-7]';
|
|
20
|
+
const digit = '[0-9]';
|
|
21
|
+
const nonzerodigit = '[1-9]';
|
|
22
|
+
const hexdigit = `(?:${digit}|[a-fA-F])`;
|
|
23
|
+
const bininteger = `(?:0[bB](?:_?${bindigit})+)`;
|
|
24
|
+
const octinteger = `(?:0[oO](?:_?${octdigit})+)`;
|
|
25
|
+
const hexinteger = `(?:0[xX](?:_?${hexdigit})+)`;
|
|
26
|
+
const decinteger = `(?:${nonzerodigit}(?:_?${digit})*|0+(?:_?0)*)`;
|
|
27
|
+
const integer = `(?:${decinteger}|${bininteger}|${octinteger}|${hexinteger})`;
|
|
28
|
+
const digitpart = `(?:${digit}(?:_?${digit})*)`;
|
|
29
|
+
const fraction = `(?:\\.${digitpart})`;
|
|
30
|
+
const exponent = `(?:[eE][-+]?${digitpart})`;
|
|
31
|
+
const pointfloat = `(?:${digitpart}?${fraction}|${digitpart}\\.)`;
|
|
32
|
+
const exponentfloat = `(?:(?:${digitpart}|${pointfloat})${exponent})`;
|
|
33
|
+
const floatnumber = `(?:${pointfloat}|${exponentfloat})`;
|
|
34
|
+
const numbers = new RegExp(`(?:${integer}|${floatnumber})`);
|
|
35
|
+
export const lexer = {
|
|
36
|
+
joinLines: '\\',
|
|
37
|
+
comments: [{ type: 'line-comment', startsWith: '#' }],
|
|
38
|
+
symbols: /[_a-zA-Z][_a-zA-Z0-9]*/,
|
|
39
|
+
numbers,
|
|
40
|
+
operators,
|
|
41
|
+
brackets: [
|
|
42
|
+
{ startsWith: '{', endsWith: '}' },
|
|
43
|
+
{ startsWith: '[', endsWith: ']' },
|
|
44
|
+
{ startsWith: '(', endsWith: ')' },
|
|
45
|
+
],
|
|
46
|
+
strings: [
|
|
47
|
+
{ startsWith: "'", escapeChar: '\\' },
|
|
48
|
+
{ startsWith: '"', escapeChar: '\\' },
|
|
49
|
+
{ startsWith: "'''", escapeChar: '\\' },
|
|
50
|
+
{ startsWith: '"""', escapeChar: '\\' },
|
|
51
|
+
{
|
|
52
|
+
startsWith: "f'",
|
|
53
|
+
endsWith: "'",
|
|
54
|
+
escapeChar: '\\',
|
|
55
|
+
templates: [{ type: 'expr', startsWith: '{', endsWith: '}' }],
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
startsWith: 'f"',
|
|
59
|
+
endsWith: '"',
|
|
60
|
+
escapeChar: '\\',
|
|
61
|
+
templates: [{ type: 'expr', startsWith: '{', endsWith: '}' }],
|
|
62
|
+
},
|
|
63
|
+
{ startsWith: "r'", endsWith: "'" },
|
|
64
|
+
{ startsWith: 'r"', endsWith: '"' },
|
|
65
|
+
],
|
|
66
|
+
};
|
|
67
|
+
export const parser = {
|
|
68
|
+
useIndentBlocks: true,
|
|
69
|
+
};
|
|
70
|
+
export const lang = { lexer, parser };
|
|
71
71
|
//# sourceMappingURL=python.js.map
|
package/dist/esm/lang/scala.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { LexerConfig } from '../lexer/types';
|
|
2
|
-
import type { ParserConfig } from '../parser/types';
|
|
3
|
-
import type { LanguageConfig } from './types';
|
|
4
|
-
export declare const lexer: LexerConfig;
|
|
5
|
-
export declare const parser: ParserConfig;
|
|
6
|
-
export declare const lang: LanguageConfig;
|
|
1
|
+
import type { LexerConfig } from '../lexer/types';
|
|
2
|
+
import type { ParserConfig } from '../parser/types';
|
|
3
|
+
import type { LanguageConfig } from './types';
|
|
4
|
+
export declare const lexer: LexerConfig;
|
|
5
|
+
export declare const parser: ParserConfig;
|
|
6
|
+
export declare const lang: LanguageConfig;
|
|
7
7
|
//# sourceMappingURL=scala.d.ts.map
|
package/dist/esm/lang/scala.js
CHANGED
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
const operators =
|
|
2
|
-
/* prettier-ignore */ [
|
|
3
|
-
'+', '-', '*', '/', '%', '%%', '%%%', '**',
|
|
4
|
-
'++', '--',
|
|
5
|
-
'+=', '++=', '-=', '*=', '/=', '%=', '**=',
|
|
6
|
-
'==', '!=', '<', '<=', '>', '>=', '===', '!==', '<=>',
|
|
7
|
-
'&&', '||', '!',
|
|
8
|
-
'&', '|', '^', '~',
|
|
9
|
-
'<<', '>>', '>>>',
|
|
10
|
-
'?', '?:',
|
|
11
|
-
':=', '=', '?=',
|
|
12
|
-
'.', '?.', '.@', '.&', '::', ':::',
|
|
13
|
-
'=~', '==~',
|
|
14
|
-
'*.', ':',
|
|
15
|
-
'..', '..<',
|
|
16
|
-
'<>',
|
|
17
|
-
'<<=', '>>=', '>>>=', '&=', '^=', '|=', '?=',
|
|
18
|
-
'->',
|
|
19
|
-
',', ';',
|
|
20
|
-
];
|
|
21
|
-
const octdigit = '[0-7]';
|
|
22
|
-
const digit = '[0-9]';
|
|
23
|
-
const nonzerodigit = '[1-9]';
|
|
24
|
-
const hexdigit = `(?:${digit}|[a-fA-F])`;
|
|
25
|
-
const octinteger = `(?:0[oO](?:_?${octdigit})+)`;
|
|
26
|
-
const hexinteger = `(?:0[xX](?:_?${hexdigit})+)`;
|
|
27
|
-
const decinteger = `(?:${nonzerodigit}(?:_?${digit})*|0+(?:_?0)*)`;
|
|
28
|
-
const integer = `(?:${decinteger}|${octinteger}|${hexinteger})`;
|
|
29
|
-
const digitpart = `(?:${digit}(?:_?${digit})*)`;
|
|
30
|
-
const fraction = `(?:\\.${digitpart})`;
|
|
31
|
-
const exponent = `(?:[eE][-+]?${digitpart})`;
|
|
32
|
-
const pointfloat = `(?:${digitpart}?${fraction}|${digitpart}\\.)`;
|
|
33
|
-
const exponentfloat = `(?:(?:${digitpart}|${pointfloat})${exponent})`;
|
|
34
|
-
const floatnumber = `(?:${pointfloat}|${exponentfloat})`;
|
|
35
|
-
const numbers = new RegExp(`(?:${integer}|${floatnumber})`);
|
|
36
|
-
const templates = [
|
|
37
|
-
{
|
|
38
|
-
type: 'var',
|
|
39
|
-
startsWith: '$',
|
|
40
|
-
symbols: /[a-zA-Z_][a-zA-Z0-9_]+/,
|
|
41
|
-
},
|
|
42
|
-
{ type: 'expr', startsWith: '${', endsWith: '}' },
|
|
43
|
-
];
|
|
44
|
-
export const lexer = {
|
|
45
|
-
joinLines: '\\',
|
|
46
|
-
comments: [
|
|
47
|
-
{ type: 'line-comment', startsWith: '//' },
|
|
48
|
-
{ type: 'multiline-comment', startsWith: '/*', endsWith: '*/' },
|
|
49
|
-
],
|
|
50
|
-
symbols: /[_a-zA-Z][_a-zA-Z0-9]*/,
|
|
51
|
-
numbers,
|
|
52
|
-
operators,
|
|
53
|
-
brackets: [
|
|
54
|
-
{ startsWith: '{', endsWith: '}' },
|
|
55
|
-
{ startsWith: '[', endsWith: ']' },
|
|
56
|
-
{ startsWith: '(', endsWith: ')' },
|
|
57
|
-
],
|
|
58
|
-
strings: [
|
|
59
|
-
{ startsWith: '"', escapeChar: '\\' },
|
|
60
|
-
{ startsWith: 'raw"', endsWith: '"' },
|
|
61
|
-
{ startsWith: 's"', templates, endsWith: '"', escapeChar: '\\' },
|
|
62
|
-
{ startsWith: 'f"', templates, endsWith: '"', escapeChar: '\\' },
|
|
63
|
-
],
|
|
64
|
-
};
|
|
65
|
-
export const parser = {
|
|
66
|
-
useIndentBlocks: false,
|
|
67
|
-
};
|
|
68
|
-
export const lang = { lexer, parser };
|
|
1
|
+
const operators =
|
|
2
|
+
/* prettier-ignore */ [
|
|
3
|
+
'+', '-', '*', '/', '%', '%%', '%%%', '**',
|
|
4
|
+
'++', '--',
|
|
5
|
+
'+=', '++=', '-=', '*=', '/=', '%=', '**=',
|
|
6
|
+
'==', '!=', '<', '<=', '>', '>=', '===', '!==', '<=>',
|
|
7
|
+
'&&', '||', '!',
|
|
8
|
+
'&', '|', '^', '~',
|
|
9
|
+
'<<', '>>', '>>>',
|
|
10
|
+
'?', '?:',
|
|
11
|
+
':=', '=', '?=',
|
|
12
|
+
'.', '?.', '.@', '.&', '::', ':::',
|
|
13
|
+
'=~', '==~',
|
|
14
|
+
'*.', ':',
|
|
15
|
+
'..', '..<',
|
|
16
|
+
'<>',
|
|
17
|
+
'<<=', '>>=', '>>>=', '&=', '^=', '|=', '?=',
|
|
18
|
+
'->',
|
|
19
|
+
',', ';',
|
|
20
|
+
];
|
|
21
|
+
const octdigit = '[0-7]';
|
|
22
|
+
const digit = '[0-9]';
|
|
23
|
+
const nonzerodigit = '[1-9]';
|
|
24
|
+
const hexdigit = `(?:${digit}|[a-fA-F])`;
|
|
25
|
+
const octinteger = `(?:0[oO](?:_?${octdigit})+)`;
|
|
26
|
+
const hexinteger = `(?:0[xX](?:_?${hexdigit})+)`;
|
|
27
|
+
const decinteger = `(?:${nonzerodigit}(?:_?${digit})*|0+(?:_?0)*)`;
|
|
28
|
+
const integer = `(?:${decinteger}|${octinteger}|${hexinteger})`;
|
|
29
|
+
const digitpart = `(?:${digit}(?:_?${digit})*)`;
|
|
30
|
+
const fraction = `(?:\\.${digitpart})`;
|
|
31
|
+
const exponent = `(?:[eE][-+]?${digitpart})`;
|
|
32
|
+
const pointfloat = `(?:${digitpart}?${fraction}|${digitpart}\\.)`;
|
|
33
|
+
const exponentfloat = `(?:(?:${digitpart}|${pointfloat})${exponent})`;
|
|
34
|
+
const floatnumber = `(?:${pointfloat}|${exponentfloat})`;
|
|
35
|
+
const numbers = new RegExp(`(?:${integer}|${floatnumber})`);
|
|
36
|
+
const templates = [
|
|
37
|
+
{
|
|
38
|
+
type: 'var',
|
|
39
|
+
startsWith: '$',
|
|
40
|
+
symbols: /[a-zA-Z_][a-zA-Z0-9_]+/,
|
|
41
|
+
},
|
|
42
|
+
{ type: 'expr', startsWith: '${', endsWith: '}' },
|
|
43
|
+
];
|
|
44
|
+
export const lexer = {
|
|
45
|
+
joinLines: '\\',
|
|
46
|
+
comments: [
|
|
47
|
+
{ type: 'line-comment', startsWith: '//' },
|
|
48
|
+
{ type: 'multiline-comment', startsWith: '/*', endsWith: '*/' },
|
|
49
|
+
],
|
|
50
|
+
symbols: /[_a-zA-Z][_a-zA-Z0-9]*/,
|
|
51
|
+
numbers,
|
|
52
|
+
operators,
|
|
53
|
+
brackets: [
|
|
54
|
+
{ startsWith: '{', endsWith: '}' },
|
|
55
|
+
{ startsWith: '[', endsWith: ']' },
|
|
56
|
+
{ startsWith: '(', endsWith: ')' },
|
|
57
|
+
],
|
|
58
|
+
strings: [
|
|
59
|
+
{ startsWith: '"', escapeChar: '\\' },
|
|
60
|
+
{ startsWith: 'raw"', endsWith: '"' },
|
|
61
|
+
{ startsWith: 's"', templates, endsWith: '"', escapeChar: '\\' },
|
|
62
|
+
{ startsWith: 'f"', templates, endsWith: '"', escapeChar: '\\' },
|
|
63
|
+
],
|
|
64
|
+
};
|
|
65
|
+
export const parser = {
|
|
66
|
+
useIndentBlocks: false,
|
|
67
|
+
};
|
|
68
|
+
export const lang = { lexer, parser };
|
|
69
69
|
//# sourceMappingURL=scala.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { LexerConfig } from '../lexer/types';
|
|
2
|
-
import type { ParserConfig } from '../parser/types';
|
|
3
|
-
import type { LanguageConfig } from './types';
|
|
4
|
-
export declare const lexer: LexerConfig;
|
|
5
|
-
export declare const parser: ParserConfig;
|
|
6
|
-
export declare const lang: LanguageConfig;
|
|
1
|
+
import type { LexerConfig } from '../lexer/types';
|
|
2
|
+
import type { ParserConfig } from '../parser/types';
|
|
3
|
+
import type { LanguageConfig } from './types';
|
|
4
|
+
export declare const lexer: LexerConfig;
|
|
5
|
+
export declare const parser: ParserConfig;
|
|
6
|
+
export declare const lang: LanguageConfig;
|
|
7
7
|
//# sourceMappingURL=starlark.d.ts.map
|
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @see https://github.com/bazelbuild/starlark/blob/master/spec.md#lexical-elements
|
|
3
|
-
*/
|
|
4
|
-
const operators =
|
|
5
|
-
/* prettier-ignore */ [
|
|
6
|
-
'+', '-', '*', '//', '%', '**',
|
|
7
|
-
'~', '&', '|', '^', '<<', '>>',
|
|
8
|
-
'.', ',', '=', ';', ':',
|
|
9
|
-
'<', '>', '>=', '<=', '==', '!=',
|
|
10
|
-
'+=', '-=', '*=', '//=', '%=',
|
|
11
|
-
'&=', '|=', '^=', '<<=', '>>=',
|
|
12
|
-
];
|
|
13
|
-
const octdigit = '[0-7]';
|
|
14
|
-
const digit = '[0-9]';
|
|
15
|
-
const nonzerodigit = '[1-9]';
|
|
16
|
-
const hexdigit = `(?:${digit}|[a-fA-F])`;
|
|
17
|
-
const octinteger = `(?:0[oO](?:_?${octdigit})+)`;
|
|
18
|
-
const hexinteger = `(?:0[xX](?:_?${hexdigit})+)`;
|
|
19
|
-
const decinteger = `(?:${nonzerodigit}(?:_?${digit})*|0+(?:_?0)*)`;
|
|
20
|
-
const integer = `(?:${decinteger}|${octinteger}|${hexinteger})`;
|
|
21
|
-
const digitpart = `(?:${digit}(?:_?${digit})*)`;
|
|
22
|
-
const fraction = `(?:\\.${digitpart})`;
|
|
23
|
-
const exponent = `(?:[eE][-+]?${digitpart})`;
|
|
24
|
-
const pointfloat = `(?:${digitpart}?${fraction}|${digitpart}\\.)`;
|
|
25
|
-
const exponentfloat = `(?:(?:${digitpart}|${pointfloat})${exponent})`;
|
|
26
|
-
const floatnumber = `(?:${pointfloat}|${exponentfloat})`;
|
|
27
|
-
const numbers = new RegExp(`(?:${integer}|${floatnumber})`);
|
|
28
|
-
export const lexer = {
|
|
29
|
-
joinLines: '\\',
|
|
30
|
-
comments: [{ type: 'line-comment', startsWith: '#' }],
|
|
31
|
-
symbols: /[_a-zA-Z][_a-zA-Z0-9]*/,
|
|
32
|
-
numbers,
|
|
33
|
-
operators,
|
|
34
|
-
brackets: [
|
|
35
|
-
{ startsWith: '{', endsWith: '}' },
|
|
36
|
-
{ startsWith: '[', endsWith: ']' },
|
|
37
|
-
{ startsWith: '(', endsWith: ')' },
|
|
38
|
-
],
|
|
39
|
-
strings: [
|
|
40
|
-
{ startsWith: "'", escapeChar: '\\' },
|
|
41
|
-
{ startsWith: '"', escapeChar: '\\' },
|
|
42
|
-
{ startsWith: "'''", escapeChar: '\\' },
|
|
43
|
-
{ startsWith: '"""', escapeChar: '\\' },
|
|
44
|
-
{ startsWith: "r'", endsWith: "'" },
|
|
45
|
-
{ startsWith: 'r"', endsWith: '"' },
|
|
46
|
-
{ startsWith: "rb'", endsWith: "'" },
|
|
47
|
-
{ startsWith: 'rb"', endsWith: '"' },
|
|
48
|
-
{ startsWith: "br'", endsWith: "'" },
|
|
49
|
-
{ startsWith: 'br"', endsWith: '"' },
|
|
50
|
-
],
|
|
51
|
-
};
|
|
52
|
-
export const parser = {
|
|
53
|
-
useIndentBlocks: true,
|
|
54
|
-
};
|
|
55
|
-
export const lang = { lexer, parser };
|
|
1
|
+
/**
|
|
2
|
+
* @see https://github.com/bazelbuild/starlark/blob/master/spec.md#lexical-elements
|
|
3
|
+
*/
|
|
4
|
+
const operators =
|
|
5
|
+
/* prettier-ignore */ [
|
|
6
|
+
'+', '-', '*', '//', '%', '**',
|
|
7
|
+
'~', '&', '|', '^', '<<', '>>',
|
|
8
|
+
'.', ',', '=', ';', ':',
|
|
9
|
+
'<', '>', '>=', '<=', '==', '!=',
|
|
10
|
+
'+=', '-=', '*=', '//=', '%=',
|
|
11
|
+
'&=', '|=', '^=', '<<=', '>>=',
|
|
12
|
+
];
|
|
13
|
+
const octdigit = '[0-7]';
|
|
14
|
+
const digit = '[0-9]';
|
|
15
|
+
const nonzerodigit = '[1-9]';
|
|
16
|
+
const hexdigit = `(?:${digit}|[a-fA-F])`;
|
|
17
|
+
const octinteger = `(?:0[oO](?:_?${octdigit})+)`;
|
|
18
|
+
const hexinteger = `(?:0[xX](?:_?${hexdigit})+)`;
|
|
19
|
+
const decinteger = `(?:${nonzerodigit}(?:_?${digit})*|0+(?:_?0)*)`;
|
|
20
|
+
const integer = `(?:${decinteger}|${octinteger}|${hexinteger})`;
|
|
21
|
+
const digitpart = `(?:${digit}(?:_?${digit})*)`;
|
|
22
|
+
const fraction = `(?:\\.${digitpart})`;
|
|
23
|
+
const exponent = `(?:[eE][-+]?${digitpart})`;
|
|
24
|
+
const pointfloat = `(?:${digitpart}?${fraction}|${digitpart}\\.)`;
|
|
25
|
+
const exponentfloat = `(?:(?:${digitpart}|${pointfloat})${exponent})`;
|
|
26
|
+
const floatnumber = `(?:${pointfloat}|${exponentfloat})`;
|
|
27
|
+
const numbers = new RegExp(`(?:${integer}|${floatnumber})`);
|
|
28
|
+
export const lexer = {
|
|
29
|
+
joinLines: '\\',
|
|
30
|
+
comments: [{ type: 'line-comment', startsWith: '#' }],
|
|
31
|
+
symbols: /[_a-zA-Z][_a-zA-Z0-9]*/,
|
|
32
|
+
numbers,
|
|
33
|
+
operators,
|
|
34
|
+
brackets: [
|
|
35
|
+
{ startsWith: '{', endsWith: '}' },
|
|
36
|
+
{ startsWith: '[', endsWith: ']' },
|
|
37
|
+
{ startsWith: '(', endsWith: ')' },
|
|
38
|
+
],
|
|
39
|
+
strings: [
|
|
40
|
+
{ startsWith: "'", escapeChar: '\\' },
|
|
41
|
+
{ startsWith: '"', escapeChar: '\\' },
|
|
42
|
+
{ startsWith: "'''", escapeChar: '\\' },
|
|
43
|
+
{ startsWith: '"""', escapeChar: '\\' },
|
|
44
|
+
{ startsWith: "r'", endsWith: "'" },
|
|
45
|
+
{ startsWith: 'r"', endsWith: '"' },
|
|
46
|
+
{ startsWith: "rb'", endsWith: "'" },
|
|
47
|
+
{ startsWith: 'rb"', endsWith: '"' },
|
|
48
|
+
{ startsWith: "br'", endsWith: "'" },
|
|
49
|
+
{ startsWith: 'br"', endsWith: '"' },
|
|
50
|
+
],
|
|
51
|
+
};
|
|
52
|
+
export const parser = {
|
|
53
|
+
useIndentBlocks: true,
|
|
54
|
+
};
|
|
55
|
+
export const lang = { lexer, parser };
|
|
56
56
|
//# sourceMappingURL=starlark.js.map
|
package/dist/esm/lang/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { LexerConfig } from '../lexer/types';
|
|
2
|
-
import type { ParserConfig } from '../parser/types';
|
|
3
|
-
export interface LanguageConfig {
|
|
4
|
-
lexer: LexerConfig;
|
|
5
|
-
parser: ParserConfig;
|
|
6
|
-
}
|
|
1
|
+
import type { LexerConfig } from '../lexer/types';
|
|
2
|
+
import type { ParserConfig } from '../parser/types';
|
|
3
|
+
export interface LanguageConfig {
|
|
4
|
+
lexer: LexerConfig;
|
|
5
|
+
parser: ParserConfig;
|
|
6
|
+
}
|
|
7
7
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/esm/lang/types.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=types.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { BracketOption, StatesMap } from './types';
|
|
2
|
-
export declare function isBracketKey(key: string): boolean;
|
|
3
|
-
export declare function isLeftKey(key: string): boolean;
|
|
4
|
-
export declare function isRightKey(key: string): boolean;
|
|
5
|
-
export declare function getCounterpartBracketKey(rightKey: string): string | undefined;
|
|
6
|
-
export declare function configBrackets(states: StatesMap, opts: BracketOption[]): StatesMap;
|
|
1
|
+
import type { BracketOption, StatesMap } from './types';
|
|
2
|
+
export declare function isBracketKey(key: string): boolean;
|
|
3
|
+
export declare function isLeftKey(key: string): boolean;
|
|
4
|
+
export declare function isRightKey(key: string): boolean;
|
|
5
|
+
export declare function getCounterpartBracketKey(rightKey: string): string | undefined;
|
|
6
|
+
export declare function configBrackets(states: StatesMap, opts: BracketOption[]): StatesMap;
|
|
7
7
|
//# sourceMappingURL=bracket.d.ts.map
|
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
export function isBracketKey(key) {
|
|
2
|
-
return key.startsWith('bracket$');
|
|
3
|
-
}
|
|
4
|
-
export function isLeftKey(key) {
|
|
5
|
-
return key.endsWith('$left');
|
|
6
|
-
}
|
|
7
|
-
export function isRightKey(key) {
|
|
8
|
-
return key.endsWith('$right');
|
|
9
|
-
}
|
|
10
|
-
export function getCounterpartBracketKey(rightKey) {
|
|
11
|
-
const [tokenName, idx, side] = rightKey.split('$');
|
|
12
|
-
const sides = new Set(['left', 'right']);
|
|
13
|
-
let result;
|
|
14
|
-
if (tokenName === 'bracket' && typeof side === 'string' && sides.has(side)) {
|
|
15
|
-
sides.delete(side);
|
|
16
|
-
const [counterpart] = [...sides];
|
|
17
|
-
result = [tokenName, idx, counterpart].join('$');
|
|
18
|
-
}
|
|
19
|
-
return result;
|
|
20
|
-
}
|
|
21
|
-
export function configBrackets(states, opts) {
|
|
22
|
-
const bracketDefs = {};
|
|
23
|
-
opts.forEach((option, idx) => {
|
|
24
|
-
const tokenKey = `bracket$${idx}`;
|
|
25
|
-
const leftTokenKey = `${tokenKey}$left`;
|
|
26
|
-
const leftTokenRule = {
|
|
27
|
-
t: 'string',
|
|
28
|
-
type: leftTokenKey,
|
|
29
|
-
match: option.startsWith,
|
|
30
|
-
chunk: option.startsWith,
|
|
31
|
-
};
|
|
32
|
-
const rightTokenKey = `${tokenKey}$right`;
|
|
33
|
-
const rightTokenRule = {
|
|
34
|
-
t: 'string',
|
|
35
|
-
type: rightTokenKey,
|
|
36
|
-
match: option.endsWith,
|
|
37
|
-
chunk: option.endsWith,
|
|
38
|
-
};
|
|
39
|
-
bracketDefs[leftTokenKey] = leftTokenRule;
|
|
40
|
-
bracketDefs[rightTokenKey] = rightTokenRule;
|
|
41
|
-
});
|
|
42
|
-
return {
|
|
43
|
-
...states,
|
|
44
|
-
$: {
|
|
45
|
-
...states.$,
|
|
46
|
-
...bracketDefs,
|
|
47
|
-
},
|
|
48
|
-
};
|
|
49
|
-
}
|
|
1
|
+
export function isBracketKey(key) {
|
|
2
|
+
return key.startsWith('bracket$');
|
|
3
|
+
}
|
|
4
|
+
export function isLeftKey(key) {
|
|
5
|
+
return key.endsWith('$left');
|
|
6
|
+
}
|
|
7
|
+
export function isRightKey(key) {
|
|
8
|
+
return key.endsWith('$right');
|
|
9
|
+
}
|
|
10
|
+
export function getCounterpartBracketKey(rightKey) {
|
|
11
|
+
const [tokenName, idx, side] = rightKey.split('$');
|
|
12
|
+
const sides = new Set(['left', 'right']);
|
|
13
|
+
let result;
|
|
14
|
+
if (tokenName === 'bracket' && typeof side === 'string' && sides.has(side)) {
|
|
15
|
+
sides.delete(side);
|
|
16
|
+
const [counterpart] = [...sides];
|
|
17
|
+
result = [tokenName, idx, counterpart].join('$');
|
|
18
|
+
}
|
|
19
|
+
return result;
|
|
20
|
+
}
|
|
21
|
+
export function configBrackets(states, opts) {
|
|
22
|
+
const bracketDefs = {};
|
|
23
|
+
opts.forEach((option, idx) => {
|
|
24
|
+
const tokenKey = `bracket$${idx}`;
|
|
25
|
+
const leftTokenKey = `${tokenKey}$left`;
|
|
26
|
+
const leftTokenRule = {
|
|
27
|
+
t: 'string',
|
|
28
|
+
type: leftTokenKey,
|
|
29
|
+
match: option.startsWith,
|
|
30
|
+
chunk: option.startsWith,
|
|
31
|
+
};
|
|
32
|
+
const rightTokenKey = `${tokenKey}$right`;
|
|
33
|
+
const rightTokenRule = {
|
|
34
|
+
t: 'string',
|
|
35
|
+
type: rightTokenKey,
|
|
36
|
+
match: option.endsWith,
|
|
37
|
+
chunk: option.endsWith,
|
|
38
|
+
};
|
|
39
|
+
bracketDefs[leftTokenKey] = leftTokenRule;
|
|
40
|
+
bracketDefs[rightTokenKey] = rightTokenRule;
|
|
41
|
+
});
|
|
42
|
+
return {
|
|
43
|
+
...states,
|
|
44
|
+
$: {
|
|
45
|
+
...states.$,
|
|
46
|
+
...bracketDefs,
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
50
|
//# sourceMappingURL=bracket.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bracket.js","sourceRoot":"","sources":["../../../lib/lexer/bracket.ts"],"names":[],"mappings":"AAOA,MAAM,UAAU,YAAY,CAAC,GAAW;IACtC,OAAO,GAAG,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,GAAW;IACnC,OAAO,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AAC/B,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,GAAW;IACpC,OAAO,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAChC,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAC,QAAgB;IACvD,MAAM,CAAC,SAAS,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACnD,MAAM,KAAK,GAAG,IAAI,GAAG,CAAS,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACjD,IAAI,MAAM,CAAC;IACX,IAAI,SAAS,KAAK,SAAS,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;
|
|
1
|
+
{"version":3,"file":"bracket.js","sourceRoot":"","sources":["../../../lib/lexer/bracket.ts"],"names":[],"mappings":"AAOA,MAAM,UAAU,YAAY,CAAC,GAAW;IACtC,OAAO,GAAG,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,GAAW;IACnC,OAAO,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AAC/B,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,GAAW;IACpC,OAAO,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAChC,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAC,QAAgB;IACvD,MAAM,CAAC,SAAS,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACnD,MAAM,KAAK,GAAG,IAAI,GAAG,CAAS,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACjD,IAAI,MAAM,CAAC;IACX,IAAI,SAAS,KAAK,SAAS,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;QAC3E,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACnB,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC;QACjC,MAAM,GAAG,CAAC,SAAS,EAAE,GAAG,EAAE,WAAW,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACnD,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,UAAU,cAAc,CAC5B,MAAiB,EACjB,IAAqB;IAErB,MAAM,WAAW,GAAoB,EAAE,CAAC;IACxC,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE;QAC3B,MAAM,QAAQ,GAAG,WAAW,GAAG,EAAE,CAAC;QAElC,MAAM,YAAY,GAAG,GAAG,QAAQ,OAAO,CAAC;QACxC,MAAM,aAAa,GAAe;YAChC,CAAC,EAAE,QAAQ;YACX,IAAI,EAAE,YAAY;YAClB,KAAK,EAAE,MAAM,CAAC,UAAU;YACxB,KAAK,EAAE,MAAM,CAAC,UAAU;SACzB,CAAC;QAEF,MAAM,aAAa,GAAG,GAAG,QAAQ,QAAQ,CAAC;QAC1C,MAAM,cAAc,GAAe;YACjC,CAAC,EAAE,QAAQ;YACX,IAAI,EAAE,aAAa;YACnB,KAAK,EAAE,MAAM,CAAC,QAAQ;YACtB,KAAK,EAAE,MAAM,CAAC,QAAQ;SACvB,CAAC;QAEF,WAAW,CAAC,YAAY,CAAC,GAAG,aAAa,CAAC;QAC1C,WAAW,CAAC,aAAa,CAAC,GAAG,cAAc,CAAC;IAC9C,CAAC,CAAC,CAAC;IAEH,OAAO;QACL,GAAG,MAAM;QACT,CAAC,EAAE;YACD,GAAG,MAAM,CAAC,CAAC;YACX,GAAG,WAAW;SACf;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CommentOption, StatesMap } from './types';
|
|
2
|
-
export declare function esc(input: string): string;
|
|
3
|
-
export declare function configComments(states: StatesMap, opts: CommentOption[]): StatesMap;
|
|
1
|
+
import type { CommentOption, StatesMap } from './types';
|
|
2
|
+
export declare function esc(input: string): string;
|
|
3
|
+
export declare function configComments(states: StatesMap, opts: CommentOption[]): StatesMap;
|
|
4
4
|
//# sourceMappingURL=comment.d.ts.map
|