process() — tailwindcss Function Reference
Architecture documentation for the process() function in elixir.rs from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD 805c55d0_724e_ef9a_ef93_7b3785213d7d["process()"] 49b7c9b9_4460_eeb3_7d00_eaf6ca7e963c["elixir.rs"] 805c55d0_724e_ef9a_ef93_7b3785213d7d -->|defined in| 49b7c9b9_4460_eeb3_7d00_eaf6ca7e963c style 805c55d0_724e_ef9a_ef93_7b3785213d7d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
crates/oxide/src/extractor/pre_processors/elixir.rs lines 9–64
fn process(&self, content: &[u8]) -> Vec<u8> {
let mut cursor = cursor::Cursor::new(content);
let mut result = content.to_vec();
let mut bracket_stack = BracketStack::default();
while cursor.pos < content.len() {
// Look for a sigil marker
if cursor.curr != b'~' {
cursor.advance();
continue;
}
// Scan charlists, strings, and wordlists
if !matches!(cursor.next, b'c' | b'C' | b's' | b'S' | b'w' | b'W') {
cursor.advance();
continue;
}
cursor.advance_twice();
// Match the opening for a sigil
if !matches!(cursor.curr, b'(' | b'[' | b'{') {
continue;
}
// Replace the opening bracket with a space
result[cursor.pos] = b' ';
// Scan until we find a balanced closing one and replace it too
bracket_stack.push(cursor.curr);
while cursor.pos < content.len() {
cursor.advance();
match cursor.curr {
// Escaped character, skip ahead to the next character
b'\\' => cursor.advance_twice(),
b'(' | b'[' | b'{' => {
bracket_stack.push(cursor.curr);
}
b')' | b']' | b'}' if !bracket_stack.is_empty() => {
bracket_stack.pop(cursor.curr);
if bracket_stack.is_empty() {
// Replace the closing bracket with a space
result[cursor.pos] = b' ';
break;
}
}
_ => {}
}
}
}
result
}
Domain
Subdomains
Source
Frequently Asked Questions
What does process() do?
process() is a function in the tailwindcss codebase, defined in crates/oxide/src/extractor/pre_processors/elixir.rs.
Where is process() defined?
process() is defined in crates/oxide/src/extractor/pre_processors/elixir.rs at line 9.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free