Home / File/ arbitrary_property_machine.rs — tailwindcss Source File

arbitrary_property_machine.rs — tailwindcss Source File

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

File rust Oxide Extractor 10 imports 8 functions

Entity Profile

Dependency Diagram

graph LR
  67459930_8537_2caf_b2cb_b2270e50566c["arbitrary_property_machine.rs"]
  12eefb39_12aa_f996_7af1_5862bf52586f["super::"]
  67459930_8537_2caf_b2cb_b2270e50566c --> 12eefb39_12aa_f996_7af1_5862bf52586f
  96a36755_a007_15e1_ec6c_526c02d24b9b["crate::cursor"]
  67459930_8537_2caf_b2cb_b2270e50566c --> 96a36755_a007_15e1_ec6c_526c02d24b9b
  c4d29b89_2191_f275_13fb_7cf117340055["crate::extractor::bracket_stack::BracketStack"]
  67459930_8537_2caf_b2cb_b2270e50566c --> c4d29b89_2191_f275_13fb_7cf117340055
  05907c18_a40e_a5a9_c7c3_5faba98e1e87["crate::extractor::machine::"]
  67459930_8537_2caf_b2cb_b2270e50566c --> 05907c18_a40e_a5a9_c7c3_5faba98e1e87
  97660f8c_0153_2876_c098_776592fda81c["crate::extractor::string_machine::StringMachine"]
  67459930_8537_2caf_b2cb_b2270e50566c --> 97660f8c_0153_2876_c098_776592fda81c
  64c98dc4_b6f7_f800_9bb4_3671c5878bf3["crate::extractor::CssVariableMachine"]
  67459930_8537_2caf_b2cb_b2270e50566c --> 64c98dc4_b6f7_f800_9bb4_3671c5878bf3
  7a907858_c7d2_db19_0e89_e3d1d2242e48["classification_macros::ClassifyBytes"]
  67459930_8537_2caf_b2cb_b2270e50566c --> 7a907858_c7d2_db19_0e89_e3d1d2242e48
  142fa702_89b6_67b8_98c2_0b9511d45aa0["std::marker::PhantomData"]
  67459930_8537_2caf_b2cb_b2270e50566c --> 142fa702_89b6_67b8_98c2_0b9511d45aa0
  4d153f79_f78b_b66c_1e8a_11a0eb99bd41["crate::extractor::machine::Machine"]
  67459930_8537_2caf_b2cb_b2270e50566c --> 4d153f79_f78b_b66c_1e8a_11a0eb99bd41
  433675ca_8d0e_feff_42a5_b3f666878cca["pretty_assertions::assert_eq"]
  67459930_8537_2caf_b2cb_b2270e50566c --> 433675ca_8d0e_feff_42a5_b3f666878cca
  style 67459930_8537_2caf_b2cb_b2270e50566c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

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

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

/// Parsing the property, e.g.:
///
/// ```text
/// [color:red]
///  ^^^^^
///
/// [--my-color:red]
///  ^^^^^^^^^^
/// ```
#[derive(Debug, Default)]
pub struct ParsingPropertyState;

/// Parsing the value, e.g.:
///
/// ```text
/// [color:red]
///        ^^^
/// ```
#[derive(Debug, Default)]
pub struct ParsingValueState;

/// Extracts arbitrary properties from the input, including the brackets.
///
/// E.g.:
///
/// ```text
/// [color:red]
/// ^^^^^^^^^^^
///
/// [--my-color:red]
/// ^^^^^^^^^^^^^^^^
/// ```
#[derive(Debug, Default)]
pub struct ArbitraryPropertyMachine<State = IdleState> {
    /// Start position of the arbitrary value
    start_pos: usize,

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

    css_variable_machine: CssVariableMachine,
    string_machine: StringMachine,

    _state: PhantomData<State>,
}

impl<State> ArbitraryPropertyMachine<State> {
    #[inline(always)]
    fn transition<NextState>(&self) -> ArbitraryPropertyMachine<NextState> {
// ... (398 more lines)

Domain

Subdomains

Dependencies

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

Frequently Asked Questions

What does arbitrary_property_machine.rs do?
arbitrary_property_machine.rs is a source file in the tailwindcss codebase, written in rust. It belongs to the Oxide domain, Extractor subdomain.
What functions are defined in arbitrary_property_machine.rs?
arbitrary_property_machine.rs defines 8 function(s): next, parse_property_variable, parse_string, reset, test_arbitrary_property_machine_extraction, test_arbitrary_property_machine_performance, test_exceptions, transition.
What does arbitrary_property_machine.rs depend on?
arbitrary_property_machine.rs imports 10 module(s): classification_macros::ClassifyBytes, crate::cursor, crate::extractor::CssVariableMachine, crate::extractor::bracket_stack::BracketStack, crate::extractor::machine::, crate::extractor::machine::Machine, crate::extractor::string_machine::StringMachine, pretty_assertions::assert_eq, and 2 more.
Where is arbitrary_property_machine.rs in the architecture?
arbitrary_property_machine.rs is located at crates/oxide/src/extractor/arbitrary_property_machine.rs (domain: Oxide, 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