css-parser.ts — tailwindcss Source File
Architecture documentation for css-parser.ts, a typescript file in the tailwindcss codebase. 10 imports, 12 dependents.
Entity Profile
Dependency Diagram
graph LR 8be42ab2_7e92_957a_da93_ffe4c7d161fe["css-parser.ts"] b9cbffa4_c352_cf3c_268f_cbb174fb3a47["ast.ts"] 8be42ab2_7e92_957a_da93_ffe4c7d161fe --> b9cbffa4_c352_cf3c_268f_cbb174fb3a47 2f6881be_62d9_4b96_7331_a962ced095f7["atRule"] 8be42ab2_7e92_957a_da93_ffe4c7d161fe --> 2f6881be_62d9_4b96_7331_a962ced095f7 fdbae017_3891_f845_038f_5fc0e026e5e4["comment"] 8be42ab2_7e92_957a_da93_ffe4c7d161fe --> fdbae017_3891_f845_038f_5fc0e026e5e4 1369a6dc_e395_347d_5d24_b88e22c5446d["decl"] 8be42ab2_7e92_957a_da93_ffe4c7d161fe --> 1369a6dc_e395_347d_5d24_b88e22c5446d 085cf56e_8188_afb1_04da_5ccd0fb7babc["rule"] 8be42ab2_7e92_957a_da93_ffe4c7d161fe --> 085cf56e_8188_afb1_04da_5ccd0fb7babc c078df4e_9ae3_a02e_4feb_6380507fddd9["line-table.ts"] 8be42ab2_7e92_957a_da93_ffe4c7d161fe --> c078df4e_9ae3_a02e_4feb_6380507fddd9 1c8e1044_08e4_f6ad_7550_c4fa3667fbf3["createLineTable"] 8be42ab2_7e92_957a_da93_ffe4c7d161fe --> 1c8e1044_08e4_f6ad_7550_c4fa3667fbf3 45262882_ddec_eb81_dedb_b4f286a3f721["source.ts"] 8be42ab2_7e92_957a_da93_ffe4c7d161fe --> 45262882_ddec_eb81_dedb_b4f286a3f721 c559b871_eb1d_407d_d482_821ec44dea54["Source"] 8be42ab2_7e92_957a_da93_ffe4c7d161fe --> c559b871_eb1d_407d_d482_821ec44dea54 0befe1e4_cbdb_e481_9c0a_5c5c6d3e2a01["SourceLocation"] 8be42ab2_7e92_957a_da93_ffe4c7d161fe --> 0befe1e4_cbdb_e481_9c0a_5c5c6d3e2a01 95a806ab_8556_4112_9786_fda4ff23eeca["urls.ts"] 95a806ab_8556_4112_9786_fda4ff23eeca --> 8be42ab2_7e92_957a_da93_ffe4c7d161fe 85ba2ac2_aa8c_15cb_ed3c_011dc66339d7["ast.test.ts"] 85ba2ac2_aa8c_15cb_ed3c_011dc66339d7 --> 8be42ab2_7e92_957a_da93_ffe4c7d161fe a2ef882b_7487_6c59_65f1_90f22f9499ea["ast.bench.ts"] a2ef882b_7487_6c59_65f1_90f22f9499ea --> 8be42ab2_7e92_957a_da93_ffe4c7d161fe 3cba0ed8_8a2c_6367_67e3_fed6b42249a5["ast.test.ts"] 3cba0ed8_8a2c_6367_67e3_fed6b42249a5 --> 8be42ab2_7e92_957a_da93_ffe4c7d161fe style 8be42ab2_7e92_957a_da93_ffe4c7d161fe fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import {
atRule,
comment,
decl,
rule,
type AstNode,
type AtRule,
type Comment,
type Declaration,
type Rule,
} from './ast'
import { createLineTable } from './source-maps/line-table'
import type { Source, SourceLocation } from './source-maps/source'
const BACKSLASH = 0x5c
const SLASH = 0x2f
const ASTERISK = 0x2a
const DOUBLE_QUOTE = 0x22
const SINGLE_QUOTE = 0x27
const COLON = 0x3a
const SEMICOLON = 0x3b
const LINE_BREAK = 0x0a
const CARRIAGE_RETURN = 0xd
const SPACE = 0x20
const TAB = 0x09
const OPEN_CURLY = 0x7b
const CLOSE_CURLY = 0x7d
const OPEN_PAREN = 0x28
const CLOSE_PAREN = 0x29
const OPEN_BRACKET = 0x5b
const CLOSE_BRACKET = 0x5d
const DASH = 0x2d
const AT_SIGN = 0x40
const EXCLAMATION_MARK = 0x21
export interface ParseOptions {
from?: string
}
/**
* CSS syntax error with source location information.
*/
export class CssSyntaxError extends Error {
loc: SourceLocation | null
constructor(message: string, loc: SourceLocation | null) {
if (loc) {
let source = loc[0]
let start = createLineTable(source.code).find(loc[1])
message = `${source.file}:${start.line}:${start.column + 1}: ${message}`
}
super(message)
this.name = 'CssSyntaxError'
this.loc = loc
if (Error.captureStackTrace) {
Error.captureStackTrace(this, CssSyntaxError)
}
// ... (658 more lines)
Domain
Subdomains
Classes
Types
Imported By
- packages/tailwindcss/src/ast.bench.ts
- packages/@tailwindcss-postcss/src/ast.test.ts
- packages/tailwindcss/src/ast.test.ts
- packages/tailwindcss/src/ast.ts
- packages/tailwindcss/src/at-import.ts
- packages/tailwindcss/src/css-parser.bench.ts
- packages/tailwindcss/src/css-parser.test.ts
- packages/tailwindcss/src/expand-declaration.test.ts
- packages/tailwindcss/src/index.ts
- packages/tailwindcss/src/compat/plugin-api.ts
- packages/tailwindcss/src/source-maps/translation-map.test.ts
- packages/@tailwindcss-node/src/urls.ts
Source
Frequently Asked Questions
What does css-parser.ts do?
css-parser.ts is a source file in the tailwindcss codebase, written in typescript. It belongs to the Oxide domain, Extractor subdomain.
What functions are defined in css-parser.ts?
css-parser.ts defines 4 function(s): parse, parseAtRule, parseDeclaration, parseString.
What does css-parser.ts depend on?
css-parser.ts imports 10 module(s): Source, SourceLocation, ast.ts, atRule, comment, createLineTable, decl, line-table.ts, and 2 more.
What files import css-parser.ts?
css-parser.ts is imported by 12 file(s): ast.bench.ts, ast.test.ts, ast.test.ts, ast.ts, at-import.ts, css-parser.bench.ts, css-parser.test.ts, expand-declaration.test.ts, and 4 more.
Where is css-parser.ts in the architecture?
css-parser.ts is located at packages/tailwindcss/src/css-parser.ts (domain: Oxide, subdomain: Extractor, directory: packages/tailwindcss/src).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free