Home / Function/ next() — tailwindcss Function Reference

next() — tailwindcss Function Reference

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

Function rust OxideCore Extractor calls 3 called by 3

Entity Profile

Dependency Diagram

graph TD
  da480653_3dab_cca9_44d1_efce632afce6["next()"]
  2ff03701_b9e2_7896_5775_102b15721ddb["parse_arbitrary_property()"]
  2ff03701_b9e2_7896_5775_102b15721ddb -->|calls| da480653_3dab_cca9_44d1_efce632afce6
  313abd43_b087_1281_3c1a_86e7b857a8c3["parse_named_utility()"]
  313abd43_b087_1281_3c1a_86e7b857a8c3 -->|calls| da480653_3dab_cca9_44d1_efce632afce6
  40720235_daf5_e707_96dc_cc8f52933b5a["parse_modifier()"]
  40720235_daf5_e707_96dc_cc8f52933b5a -->|calls| da480653_3dab_cca9_44d1_efce632afce6
  2ff03701_b9e2_7896_5775_102b15721ddb["parse_arbitrary_property()"]
  da480653_3dab_cca9_44d1_efce632afce6 -->|calls| 2ff03701_b9e2_7896_5775_102b15721ddb
  313abd43_b087_1281_3c1a_86e7b857a8c3["parse_named_utility()"]
  da480653_3dab_cca9_44d1_efce632afce6 -->|calls| 313abd43_b087_1281_3c1a_86e7b857a8c3
  35b2adf8_a27b_5aee_3865_21fb048c97fb["advance()"]
  da480653_3dab_cca9_44d1_efce632afce6 -->|calls| 35b2adf8_a27b_5aee_3865_21fb048c97fb
  style da480653_3dab_cca9_44d1_efce632afce6 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

crates/oxide/src/extractor/utility_machine.rs lines 29–74

    fn next(&mut self, cursor: &mut cursor::Cursor<'_>) -> MachineState {
        match cursor.curr.into() {
            // LEGACY: Important marker
            Class::Exclamation => {
                self.legacy_important = true;

                match cursor.next.into() {
                    // Start of an arbitrary property
                    //
                    // E.g.: `![color:red]`
                    //        ^
                    Class::OpenBracket => {
                        self.start_pos = cursor.pos;
                        cursor.advance();
                        self.parse_arbitrary_property(cursor)
                    }

                    // Start of a named utility
                    //
                    // E.g.: `!flex`
                    //        ^
                    _ => {
                        self.start_pos = cursor.pos;
                        cursor.advance();
                        self.parse_named_utility(cursor)
                    }
                }
            }

            // Start of an arbitrary property
            //
            // E.g.: `[color:red]`
            //        ^
            Class::OpenBracket => {
                self.start_pos = cursor.pos;
                self.parse_arbitrary_property(cursor)
            }

            // Everything else might be a named utility. Delegate to the named utility machine
            // to determine if it's a named utility or not.
            _ => {
                self.start_pos = cursor.pos;
                self.parse_named_utility(cursor)
            }
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does next() do?
next() is a function in the tailwindcss codebase.
What does next() call?
next() calls 3 function(s): advance, parse_arbitrary_property, parse_named_utility.
What calls next()?
next() is called by 3 function(s): parse_arbitrary_property, parse_modifier, parse_named_utility.

Analyze Your Own Codebase

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

Try Supermodel Free