process() — tailwindcss Function Reference
Architecture documentation for the process() function in elixir.rs from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD fcb42832_c373_a9e9_58bc_92e034934f8f["process()"] 35b2adf8_a27b_5aee_3865_21fb048c97fb["advance()"] fcb42832_c373_a9e9_58bc_92e034934f8f -->|calls| 35b2adf8_a27b_5aee_3865_21fb048c97fb a342bcc5_aaba_6cba_f921_8c94c0d956ac["advance_twice()"] fcb42832_c373_a9e9_58bc_92e034934f8f -->|calls| a342bcc5_aaba_6cba_f921_8c94c0d956ac style fcb42832_c373_a9e9_58bc_92e034934f8f 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