MCPcopy
hub / github.com/tailwindlabs/tailwindcss / constructor

Method constructor

packages/tailwindcss/src/css-parser.ts:46–61  ·  view source on GitHub ↗
(message: string, loc: SourceLocation | null)

Source from the content-addressed store, hash-verified

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
64export function parse(input: string, opts?: ParseOptions) {

Callers

nothing calls this directly

Calls 2

createLineTableFunction · 0.90
findMethod · 0.80

Tested by

no test coverage detected