process() — tailwindcss Function Reference
Architecture documentation for the process() function in elixir.rs from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD 02ae3fa0_054b_cd63_1b1e_fc1cea727265["process()"] 435a321a_a1e2_cb4f_7579_0ca15cb86434["advance()"] 02ae3fa0_054b_cd63_1b1e_fc1cea727265 -->|calls| 435a321a_a1e2_cb4f_7579_0ca15cb86434 07207bb0_f195_4067_2024_eb12d4800851["advance_twice()"] 02ae3fa0_054b_cd63_1b1e_fc1cea727265 -->|calls| 07207bb0_f195_4067_2024_eb12d4800851 style 02ae3fa0_054b_cd63_1b1e_fc1cea727265 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
Calls
Source
Frequently Asked Questions
What does process() do?
process() is a function in the tailwindcss codebase.
What does process() call?
process() calls 2 function(s): advance, advance_twice.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free