Home / File/ arbitrary_variable_machine.rs — tailwindcss Source File

arbitrary_variable_machine.rs — tailwindcss Source File

Architecture documentation for arbitrary_variable_machine.rs, a rust file in the tailwindcss codebase. 10 imports, 0 dependents.

File rust OxideEngine Extractor 10 imports 6 functions

Entity Profile

Dependency Diagram

graph LR
  7a494844_a376_e466_6245_0c9d5be3b787["arbitrary_variable_machine.rs"]
  088fcee0_4796_6868_3ac8_a460906e93fe["super::ArbitraryVariableMachine"]
  7a494844_a376_e466_6245_0c9d5be3b787 --> 088fcee0_4796_6868_3ac8_a460906e93fe
  e4e20bdf_ad1e_e4a0_5cba_d0f5a5db787e["crate::cursor"]
  7a494844_a376_e466_6245_0c9d5be3b787 --> e4e20bdf_ad1e_e4a0_5cba_d0f5a5db787e
  94b5420b_055c_efe5_392d_b0d15e43aa35["crate::extractor::bracket_stack::BracketStack"]
  7a494844_a376_e466_6245_0c9d5be3b787 --> 94b5420b_055c_efe5_392d_b0d15e43aa35
  049272af_30a2_00be_6819_4b41d7b5c332["crate::extractor::css_variable_machine::CssVariableMachine"]
  7a494844_a376_e466_6245_0c9d5be3b787 --> 049272af_30a2_00be_6819_4b41d7b5c332
  cd83abb6_a664_e16d_ddc8_60a3f23ba86a["crate::extractor::machine::"]
  7a494844_a376_e466_6245_0c9d5be3b787 --> cd83abb6_a664_e16d_ddc8_60a3f23ba86a
  9dfad5b5_43fe_bf7b_3e43_8f94b15347c9["crate::extractor::string_machine::StringMachine"]
  7a494844_a376_e466_6245_0c9d5be3b787 --> 9dfad5b5_43fe_bf7b_3e43_8f94b15347c9
  5731c53a_0325_b3af_2918_bcb379bc8ec6["classification_macros::ClassifyBytes"]
  7a494844_a376_e466_6245_0c9d5be3b787 --> 5731c53a_0325_b3af_2918_bcb379bc8ec6
  8c86990d_3557_b3a2_1d12_d17da0d3fa51["std::marker::PhantomData"]
  7a494844_a376_e466_6245_0c9d5be3b787 --> 8c86990d_3557_b3a2_1d12_d17da0d3fa51
  a1d398d5_15cf_6c95_338f_6f243e682240["crate::extractor::"]
  7a494844_a376_e466_6245_0c9d5be3b787 --> a1d398d5_15cf_6c95_338f_6f243e682240
  e4088d34_b5b4_ec51_b975_557a1536ec76["pretty_assertions::assert_eq"]
  7a494844_a376_e466_6245_0c9d5be3b787 --> e4088d34_b5b4_ec51_b975_557a1536ec76
  style 7a494844_a376_e466_6245_0c9d5be3b787 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

use crate::cursor;
use crate::extractor::bracket_stack::BracketStack;
use crate::extractor::css_variable_machine::CssVariableMachine;
use crate::extractor::machine::{Machine, MachineState};
use crate::extractor::string_machine::StringMachine;
use classification_macros::ClassifyBytes;
use std::marker::PhantomData;

#[derive(Debug, Default)]
pub struct IdleState;

/// Currently parsing the inside of the arbitrary variable
///
/// ```text
/// (--my-opacity)
///  ^^^^^^^^^^^^
/// ```
#[derive(Debug, Default)]
pub struct ParsingState;

/// Currently parsing the data type of the arbitrary variable
///
/// ```text
/// (length:--my-opacity)
///  ^^^^^^^
/// ```
#[derive(Debug, Default)]
pub struct ParsingDataTypeState;

/// Currently parsing the fallback of the arbitrary variable
///
/// ```text
/// (--my-opacity,50%)
///              ^^^^
/// ```
#[derive(Debug, Default)]
pub struct ParsingFallbackState;

/// Extracts arbitrary variables including the parens.
///
/// E.g.:
///
/// ```text
/// (--my-value)
/// ^^^^^^^^^^^^
///
/// bg-red-500/(--my-opacity)
///            ^^^^^^^^^^^^^^
/// ```
#[derive(Debug, Default)]
pub struct ArbitraryVariableMachine<State = IdleState> {
    /// Start position of the arbitrary variable
    start_pos: usize,

    /// Track brackets to ensure they are balanced
    bracket_stack: BracketStack,

    string_machine: StringMachine,
    css_variable_machine: CssVariableMachine,

// ... (354 more lines)

Domain

Subdomains

Dependencies

  • classification_macros::ClassifyBytes
  • crate::cursor
  • crate::extractor::
  • crate::extractor::bracket_stack::BracketStack
  • crate::extractor::css_variable_machine::CssVariableMachine
  • crate::extractor::machine::
  • crate::extractor::string_machine::StringMachine
  • pretty_assertions::assert_eq
  • std::marker::PhantomData
  • super::ArbitraryVariableMachine

Frequently Asked Questions

What does arbitrary_variable_machine.rs do?
arbitrary_variable_machine.rs is a source file in the tailwindcss codebase, written in rust. It belongs to the OxideEngine domain, Extractor subdomain.
What functions are defined in arbitrary_variable_machine.rs?
arbitrary_variable_machine.rs defines 6 function(s): next, reset, test_arbitrary_variable_extraction, test_arbitrary_variable_machine_performance, test_exceptions, transition.
What does arbitrary_variable_machine.rs depend on?
arbitrary_variable_machine.rs imports 10 module(s): classification_macros::ClassifyBytes, crate::cursor, crate::extractor::, crate::extractor::bracket_stack::BracketStack, crate::extractor::css_variable_machine::CssVariableMachine, crate::extractor::machine::, crate::extractor::string_machine::StringMachine, pretty_assertions::assert_eq, and 2 more.
Where is arbitrary_variable_machine.rs in the architecture?
arbitrary_variable_machine.rs is located at crates/oxide/src/extractor/arbitrary_variable_machine.rs (domain: OxideEngine, subdomain: Extractor, directory: crates/oxide/src/extractor).

Analyze Your Own Codebase

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

Try Supermodel Free