css-parser.ts — tailwindcss Source File
Architecture documentation for css-parser.ts, a typescript file in the tailwindcss codebase. 8 imports, 12 dependents.
Entity Profile
Dependency Diagram
graph LR 54851997_7544_bab2_96ab_548e5f5df205["css-parser.ts"] 42640952_ea63_55f1_1ff1_00816e2980ae["ast.ts"] 54851997_7544_bab2_96ab_548e5f5df205 --> 42640952_ea63_55f1_1ff1_00816e2980ae f9b19679_c1f0_28d6_4d1a_31a10c52e42d["atRule"] 54851997_7544_bab2_96ab_548e5f5df205 --> f9b19679_c1f0_28d6_4d1a_31a10c52e42d 96bdb9bb_93af_2fac_25bd_5a2e67895fa7["comment"] 54851997_7544_bab2_96ab_548e5f5df205 --> 96bdb9bb_93af_2fac_25bd_5a2e67895fa7 c203f636_607a_d332_b4c5_6a40c108f778["decl"] 54851997_7544_bab2_96ab_548e5f5df205 --> c203f636_607a_d332_b4c5_6a40c108f778 66319c06_7c38_f9ea_4bf0_2a0e18bac1a4["rule"] 54851997_7544_bab2_96ab_548e5f5df205 --> 66319c06_7c38_f9ea_4bf0_2a0e18bac1a4 ac7e86e1_459b_f374_4516_afecc84f2a17["line-table.ts"] 54851997_7544_bab2_96ab_548e5f5df205 --> ac7e86e1_459b_f374_4516_afecc84f2a17 0204f9b9_80aa_c3e8_eb61_22170d608d65["createLineTable"] 54851997_7544_bab2_96ab_548e5f5df205 --> 0204f9b9_80aa_c3e8_eb61_22170d608d65 224e6d20_656a_4689_b56d_bc18bf3b80d9["source.ts"] 54851997_7544_bab2_96ab_548e5f5df205 --> 224e6d20_656a_4689_b56d_bc18bf3b80d9 5e3855e0_f04e_28ee_98ea_8502e6531bc8["urls.ts"] 5e3855e0_f04e_28ee_98ea_8502e6531bc8 --> 54851997_7544_bab2_96ab_548e5f5df205 afa9c75b_3990_72fb_2aba_c3e6b361eec3["ast.test.ts"] afa9c75b_3990_72fb_2aba_c3e6b361eec3 --> 54851997_7544_bab2_96ab_548e5f5df205 95c02696_6e3d_8e6c_d8d8_6a9e696207b0["ast.bench.ts"] 95c02696_6e3d_8e6c_d8d8_6a9e696207b0 --> 54851997_7544_bab2_96ab_548e5f5df205 e1775747_ac0a_9408_d4ff_3677e8085ed9["ast.test.ts"] e1775747_ac0a_9408_d4ff_3677e8085ed9 --> 54851997_7544_bab2_96ab_548e5f5df205 42640952_ea63_55f1_1ff1_00816e2980ae["ast.ts"] 42640952_ea63_55f1_1ff1_00816e2980ae --> 54851997_7544_bab2_96ab_548e5f5df205 bb501946_7944_1015_b5ff_34d10aace799["at-import.ts"] bb501946_7944_1015_b5ff_34d10aace799 --> 54851997_7544_bab2_96ab_548e5f5df205 af1a6ece_0432_a556_fd63_8cb4a91f12ad["plugin-api.ts"] af1a6ece_0432_a556_fd63_8cb4a91f12ad --> 54851997_7544_bab2_96ab_548e5f5df205 style 54851997_7544_bab2_96ab_548e5f5df205 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 OxideEngine 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 8 module(s): ast.ts, atRule, comment, createLineTable, decl, line-table.ts, rule, source.ts.
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: OxideEngine, 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