(message: string, loc: SourceLocation | null)
| 44 | loc: SourceLocation | null |
| 45 | |
| 46 | constructor(message: string, loc: SourceLocation | null) { |
| 47 | if (loc) { |
| 48 | let source = loc[0] |
| 49 | let start = createLineTable(source.code).find(loc[1]) |
| 50 | message = `${source.file}:${start.line}:${start.column + 1}: ${message}` |
| 51 | } |
| 52 | |
| 53 | super(message) |
| 54 | |
| 55 | this.name = 'CssSyntaxError' |
| 56 | this.loc = loc |
| 57 | |
| 58 | if (Error.captureStackTrace) { |
| 59 | Error.captureStackTrace(this, CssSyntaxError) |
| 60 | } |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | export function parse(input: string, opts?: ParseOptions) { |
nothing calls this directly
no test coverage detected