1 import postcss from './postcss';
2 export default class CssSyntaxError implements postcss.CssSyntaxError, SyntaxError {
4 * Contains full error text in the GNU error format.
8 * Contains the source line of the error. PostCSS will use the input
9 * source map to detect the original error location. If you wrote a
10 * Sass file, compiled it to CSS and then parsed it with PostCSS,
11 * PostCSS will show the original position in the Sass file. If you need
12 * position in PostCSS input (e.g., to debug previous compiler), use
13 * error.generated.line.
17 * Contains the source column of the error. PostCSS will use the input
18 * source map to detect the original error location. If you wrote a
19 * Sass file, compiled it to CSS and then parsed it with PostCSS,
20 * PostCSS will show the original position in the Sass file. If you
21 * need position in PostCSS input (e.g., to debug previous compiler),
22 * use error.generated.column.
26 * Contains the source code of the broken file. PostCSS will use the
27 * input source map to detect the original error location. If you wrote
28 * a Sass file, compiled it to CSS and then parsed it with PostCSS,
29 * PostCSS will show the original position in the Sass file. If you
30 * need position in PostCSS input (e.g., to debug previous compiler),
31 * use error.generated.source.
35 * If parser's from option is set, contains the absolute path to the
36 * broken file. PostCSS will use the input source map to detect the
37 * original error location. If you wrote a Sass file, compiled it
38 * to CSS and then parsed it with PostCSS, PostCSS will show the
39 * original position in the Sass file. If you need the position in
40 * PostCSS input (e.g., to debug previous compiler), use
41 * error.generated.file.
45 * Contains the PostCSS plugin name if the error didn't come from the
51 * Contains only the error description.
58 input: postcss.InputOrigin;
60 * The CSS parser throws this error for broken CSS.
64 * Contains full error text in the GNU error format.
68 * Contains the source line of the error. PostCSS will use the input
69 * source map to detect the original error location. If you wrote a
70 * Sass file, compiled it to CSS and then parsed it with PostCSS,
71 * PostCSS will show the original position in the Sass file. If you need
72 * position in PostCSS input (e.g., to debug previous compiler), use
73 * error.generated.line.
77 * Contains the source column of the error. PostCSS will use the input
78 * source map to detect the original error location. If you wrote a
79 * Sass file, compiled it to CSS and then parsed it with PostCSS,
80 * PostCSS will show the original position in the Sass file. If you
81 * need position in PostCSS input (e.g., to debug previous compiler),
82 * use error.generated.column.
86 * Contains the source code of the broken file. PostCSS will use the
87 * input source map to detect the original error location. If you wrote
88 * a Sass file, compiled it to CSS and then parsed it with PostCSS,
89 * PostCSS will show the original position in the Sass file. If you
90 * need position in PostCSS input (e.g., to debug previous compiler),
91 * use error.generated.source.
95 * If parser's from option is set, contains the absolute path to the
96 * broken file. PostCSS will use the input source map to detect the
97 * original error location. If you wrote a Sass file, compiled it
98 * to CSS and then parsed it with PostCSS, PostCSS will show the
99 * original position in the Sass file. If you need the position in
100 * PostCSS input (e.g., to debug previous compiler), use
101 * error.generated.file.
105 * Contains the PostCSS plugin name if the error didn't come from the
109 private setMessage();
111 * @param color Whether arrow should be colored red by terminal color codes.
112 * By default, PostCSS will use process.stdout.isTTY and
113 * process.env.NODE_DISABLE_COLORS.
114 * @returns A few lines of CSS source that caused the error. If CSS has
115 * input source map without sourceContent this method will return an empty
118 showSourceCode(color?: boolean): string;
121 * @returns Error position, message and source code of broken part.
124 generated: postcss.InputOrigin;