@jesscss/scss-parser 2.0.0-alpha.8 → 2.0.0-alpha.9
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 +33 -8
- package/lib/ast/grammar.cjs +36610 -0
- package/lib/ast/grammar.d.ts +1 -0
- package/lib/ast/grammar.js +36609 -0
- package/lib/ast/lower-user-function-calls.d.ts +6 -0
- package/lib/cst.cjs +1 -1
- package/lib/cst.js +1 -1
- package/lib/grammar.cjs +2 -60347
- package/lib/grammar.js +1 -60346
- package/lib/grammar2.cjs +88858 -0
- package/lib/grammar2.js +88853 -0
- package/lib/index.cjs +108 -11
- package/lib/index.d.ts +10 -7
- package/lib/index.js +107 -5
- package/package.json +10 -20
- package/lib/builders.d.ts +0 -154
- package/lib/functional-parser.cjs +0 -3034
- package/lib/functional-parser.d.ts +0 -46
- package/lib/functional-parser.js +0 -3017
- package/lib/interp.d.ts +0 -26
- package/lib/jess.cjs +0 -6
- package/lib/jess.d.ts +0 -2
- package/lib/jess.js +0 -2
- package/lib/scss-atroot-helpers.d.ts +0 -4
- package/lib/scss-atrule-helpers.d.ts +0 -36
- package/lib/scss-value-helpers.d.ts +0 -11
- package/src/builders.ts +0 -1408
- package/src/cst.ts +0 -25
- package/src/functional-parser.ts +0 -135
- package/src/grammar.ts +0 -651
- package/src/index.ts +0 -14
- package/src/interp.ts +0 -158
- package/src/jess.ts +0 -11
- package/src/scss-atroot-helpers.ts +0 -105
- package/src/scss-atrule-helpers.ts +0 -191
- package/src/scss-value-helpers.ts +0 -105
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import type { TriviaMap, JessError, Rules, TreeContext, IParseResult } from '@jesscss/core';
|
|
2
|
-
/** Config accepted for API compatibility; the functional driver ignores it. */
|
|
3
|
-
export type ScssParserConfig = {
|
|
4
|
-
recoveryEnabled?: boolean;
|
|
5
|
-
[k: string]: unknown;
|
|
6
|
-
};
|
|
7
|
-
/** Grammar rule name (root `Stylesheet` by default). */
|
|
8
|
-
export type ScssRules = string;
|
|
9
|
-
export type SyntacticContentAssistSuggestion = {
|
|
10
|
-
nextTokenType: string;
|
|
11
|
-
nextTokenLabel?: string;
|
|
12
|
-
ruleStack: string[];
|
|
13
|
-
};
|
|
14
|
-
export type ScssFnParseResult = {
|
|
15
|
-
tree: Rules;
|
|
16
|
-
errors: JessError[];
|
|
17
|
-
warnings: Array<{
|
|
18
|
-
message: string;
|
|
19
|
-
deprecation?: string;
|
|
20
|
-
}>;
|
|
21
|
-
trivia: TriviaMap;
|
|
22
|
-
};
|
|
23
|
-
export type ScssFnParseOptions = {
|
|
24
|
-
context?: TreeContext;
|
|
25
|
-
};
|
|
26
|
-
export declare function parseScssFn(input: string, rule?: string, options?: ScssFnParseOptions): ScssFnParseResult;
|
|
27
|
-
/**
|
|
28
|
-
* Functional SCSS parser — the default `Parser` export. Wraps `parseScssFn` and
|
|
29
|
-
* returns the same `IParseResult` shape as the legacy Chevrotain parser (with an
|
|
30
|
-
* empty `lexerResult`; the functional grammar does not tokenize separately).
|
|
31
|
-
*/
|
|
32
|
-
export declare class ScssParser {
|
|
33
|
-
constructor(_config?: ScssParserConfig);
|
|
34
|
-
parse(text: string): IParseResult<Rules>;
|
|
35
|
-
parse(text: string, rule: 'Stylesheet'): IParseResult<Rules>;
|
|
36
|
-
parse(text: string, rule: 'Stylesheet', options: {
|
|
37
|
-
context?: TreeContext;
|
|
38
|
-
}): IParseResult<Rules>;
|
|
39
|
-
parse(text: string, rule?: string, options?: {
|
|
40
|
-
context?: TreeContext;
|
|
41
|
-
}): IParseResult;
|
|
42
|
-
suggest(_text: string, _init?: {
|
|
43
|
-
offset: number;
|
|
44
|
-
rule?: ScssRules;
|
|
45
|
-
}): SyntacticContentAssistSuggestion[];
|
|
46
|
-
}
|