next() — tailwindcss Function Reference
Architecture documentation for the next() function in named_utility_machine.rs from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD c6fb2830_47b8_7bcb_12de_d74478718ca7["next()"] bf0a5a81_9d4d_13f4_80cb_898fcfafbf69["named_utility_machine.rs"] c6fb2830_47b8_7bcb_12de_d74478718ca7 -->|defined in| bf0a5a81_9d4d_13f4_80cb_898fcfafbf69 style c6fb2830_47b8_7bcb_12de_d74478718ca7 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
crates/oxide/src/extractor/named_utility_machine.rs lines 54–107
fn next(&mut self, cursor: &mut cursor::Cursor<'_>) -> MachineState {
match cursor.curr.into() {
Class::AlphaLower => match cursor.next.into() {
// Valid single character utility in between quotes
//
// E.g.: `<div class="a"></div>`
// ^
// E.g.: `<div class="a "></div>`
// ^
// E.g.: `<div class=" a"></div>`
// ^
Class::Whitespace | Class::Quote | Class::End => self.done(cursor.pos, cursor),
// Valid start characters
//
// E.g.: `flex`
// ^
_ => {
self.start_pos = cursor.pos;
cursor.advance();
self.transition::<ParsingState>().next(cursor)
}
},
// Valid start characters
//
// E.g.: `@container`
// ^
Class::At => {
self.start_pos = cursor.pos;
cursor.advance();
self.transition::<ParsingState>().next(cursor)
}
// Valid start of a negative utility, if followed by another set of valid
// characters. `@` as a second character is invalid.
//
// E.g.: `-mx-2.5`
// ^^
Class::Dash => match cursor.next.into() {
Class::AlphaLower => {
self.start_pos = cursor.pos;
cursor.advance();
self.transition::<ParsingState>().next(cursor)
}
// A dash should not be followed by anything else
_ => MachineState::Idle,
},
// Everything else, is not a valid start of the utility.
_ => MachineState::Idle,
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does next() do?
next() is a function in the tailwindcss codebase, defined in crates/oxide/src/extractor/named_utility_machine.rs.
Where is next() defined?
next() is defined in crates/oxide/src/extractor/named_utility_machine.rs at line 54.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free