Home / Function/ next() — tailwindcss Function Reference

next() — tailwindcss Function Reference

Architecture documentation for the next() function in arbitrary_variable_machine.rs from the tailwindcss codebase.

Entity Profile

Dependency Diagram

graph TD
  6e555fdd_6567_3e2e_cd71_90e2b29e480c["next()"]
  435a321a_a1e2_cb4f_7579_0ca15cb86434["advance()"]
  6e555fdd_6567_3e2e_cd71_90e2b29e480c -->|calls| 435a321a_a1e2_cb4f_7579_0ca15cb86434
  07207bb0_f195_4067_2024_eb12d4800851["advance_twice()"]
  6e555fdd_6567_3e2e_cd71_90e2b29e480c -->|calls| 07207bb0_f195_4067_2024_eb12d4800851
  style 6e555fdd_6567_3e2e_cd71_90e2b29e480c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

crates/oxide/src/extractor/arbitrary_variable_machine.rs lines 82–109

    fn next(&mut self, cursor: &mut cursor::Cursor<'_>) -> MachineState {
        match cursor.curr.into() {
            // Arbitrary variables start with `(` followed by a CSS variable
            //
            // E.g.: `(--my-variable)`
            //        ^^
            //
            Class::OpenParen => match cursor.next.into() {
                Class::Dash => {
                    self.start_pos = cursor.pos;
                    cursor.advance();
                    self.transition::<ParsingState>().next(cursor)
                }

                Class::AlphaLower => {
                    self.start_pos = cursor.pos;
                    cursor.advance();
                    self.transition::<ParsingDataTypeState>().next(cursor)
                }

                _ => MachineState::Idle,
            },

            // Everything else, is not a valid start of the arbitrary variable. But the next
            // character might be a valid start for a new utility.
            _ => MachineState::Idle,
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does next() do?
next() is a function in the tailwindcss codebase.
What does next() call?
next() 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