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

Entity Profile

Dependency Diagram

graph TD
  87fe7e3c_7e6c_6c51_b905_30d47838ada6["next()"]
  32b9b48f_ad55_d7a6_3de9_85eb03c312f2["utility_machine.rs"]
  87fe7e3c_7e6c_6c51_b905_30d47838ada6 -->|defined in| 32b9b48f_ad55_d7a6_3de9_85eb03c312f2
  553a4156_b122_9878_45dd_1c4cd54f166c["parse_arbitrary_property()"]
  553a4156_b122_9878_45dd_1c4cd54f166c -->|calls| 87fe7e3c_7e6c_6c51_b905_30d47838ada6
  0382e593_50a2_cd57_8872_e9c5cee85c74["parse_named_utility()"]
  0382e593_50a2_cd57_8872_e9c5cee85c74 -->|calls| 87fe7e3c_7e6c_6c51_b905_30d47838ada6
  1c3921a2_bd9d_8e30_15d0_2194ca09893f["parse_modifier()"]
  1c3921a2_bd9d_8e30_15d0_2194ca09893f -->|calls| 87fe7e3c_7e6c_6c51_b905_30d47838ada6
  553a4156_b122_9878_45dd_1c4cd54f166c["parse_arbitrary_property()"]
  87fe7e3c_7e6c_6c51_b905_30d47838ada6 -->|calls| 553a4156_b122_9878_45dd_1c4cd54f166c
  0382e593_50a2_cd57_8872_e9c5cee85c74["parse_named_utility()"]
  87fe7e3c_7e6c_6c51_b905_30d47838ada6 -->|calls| 0382e593_50a2_cd57_8872_e9c5cee85c74
  style 87fe7e3c_7e6c_6c51_b905_30d47838ada6 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, defined in crates/oxide/src/extractor/utility_machine.rs.
Where is next() defined?
next() is defined in crates/oxide/src/extractor/utility_machine.rs at line 29.
What does next() call?
next() calls 2 function(s): 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