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 OxideEngine Extractor calls 1 called by 1

Entity Profile

Dependency Diagram

graph TD
  e650d757_343d_4e15_f282_4bd036154a55["next()"]
  023da2b4_cf3e_9971_a872_af94f786ed63["named_variant_machine.rs"]
  e650d757_343d_4e15_f282_4bd036154a55 -->|defined in| 023da2b4_cf3e_9971_a872_af94f786ed63
  7fdcd215_00f8_dbe1_6a49_5835fae6a3f4["parse_arbitrary_end()"]
  7fdcd215_00f8_dbe1_6a49_5835fae6a3f4 -->|calls| e650d757_343d_4e15_f282_4bd036154a55
  7fdcd215_00f8_dbe1_6a49_5835fae6a3f4["parse_arbitrary_end()"]
  e650d757_343d_4e15_f282_4bd036154a55 -->|calls| 7fdcd215_00f8_dbe1_6a49_5835fae6a3f4
  style e650d757_343d_4e15_f282_4bd036154a55 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, defined in crates/oxide/src/extractor/named_variant_machine.rs.
Where is next() defined?
next() is defined in crates/oxide/src/extractor/named_variant_machine.rs at line 83.
What does next() call?
next() calls 1 function(s): 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