Home / Function/ next() — tailwindcss Function Reference

next() — tailwindcss Function Reference

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

Function rust RustCore MachineExtractor calls 2 called by 1

Entity Profile

Dependency Diagram

graph TD
  a5c260ba_8fd7_8059_de83_db6b0882cb4b["next()"]
  1dd44570_5607_a66d_776b_f52e0e1080f5["parse_arbitrary_end()"]
  1dd44570_5607_a66d_776b_f52e0e1080f5 -->|calls| a5c260ba_8fd7_8059_de83_db6b0882cb4b
  435a321a_a1e2_cb4f_7579_0ca15cb86434["advance()"]
  a5c260ba_8fd7_8059_de83_db6b0882cb4b -->|calls| 435a321a_a1e2_cb4f_7579_0ca15cb86434
  1dd44570_5607_a66d_776b_f52e0e1080f5["parse_arbitrary_end()"]
  a5c260ba_8fd7_8059_de83_db6b0882cb4b -->|calls| 1dd44570_5607_a66d_776b_f52e0e1080f5
  style a5c260ba_8fd7_8059_de83_db6b0882cb4b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

crates/oxide/src/extractor/named_variant_machine.rs lines 83–125

    fn next(&mut self, cursor: &mut cursor::Cursor<'_>) -> MachineState {
        match cursor.curr.into() {
            Class::AlphaLower | Class::Star => match cursor.next.into() {
                // Valid single character variant, must be followed by a `:`
                //
                // E.g.: `<div class="x:flex"></div>`
                //                    ^^
                // E.g.: `*:`
                //        ^^
                Class::Colon => {
                    cursor.advance();
                    self.transition::<ParsingEndState>().next(cursor)
                }

                // Valid start characters
                //
                // E.g.: `hover:`
                //        ^
                // E.g.: `**:`
                //        ^
                _ => {
                    self.start_pos = cursor.pos;
                    cursor.advance();
                    self.transition::<ParsingState>().next(cursor)
                }
            },

            // Valid start characters
            //
            // E.g.: `2xl:`
            //        ^
            // E.g.: `@md:`
            //        ^
            Class::Number | Class::At => {
                self.start_pos = cursor.pos;
                cursor.advance();
                self.transition::<ParsingState>().next(cursor)
            }

            // Everything else, is not a valid start of the variant.
            _ => 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, parse_arbitrary_end.
What calls next()?
next() is called by 1 function(s): parse_arbitrary_end.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free