Home / File/ named_variant_machine.rs — tailwindcss Source File

named_variant_machine.rs — tailwindcss Source File

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

File rust Oxide Extractor 10 imports 6 functions

Entity Profile

Dependency Diagram

graph LR
  cb4ab49e_1e98_295d_47fb_b3820e774321["named_variant_machine.rs"]
  12eefb39_12aa_f996_7af1_5862bf52586f["super::"]
  cb4ab49e_1e98_295d_47fb_b3820e774321 --> 12eefb39_12aa_f996_7af1_5862bf52586f
  96a36755_a007_15e1_ec6c_526c02d24b9b["crate::cursor"]
  cb4ab49e_1e98_295d_47fb_b3820e774321 --> 96a36755_a007_15e1_ec6c_526c02d24b9b
  ec3c2d9b_617f_ce45_34ee_554128afd65f["crate::extractor::arbitrary_value_machine::ArbitraryValueMachine"]
  cb4ab49e_1e98_295d_47fb_b3820e774321 --> ec3c2d9b_617f_ce45_34ee_554128afd65f
  9827a250_2729_b49f_1d1f_5a8965ab90ba["crate::extractor::arbitrary_variable_machine::ArbitraryVariableMachine"]
  cb4ab49e_1e98_295d_47fb_b3820e774321 --> 9827a250_2729_b49f_1d1f_5a8965ab90ba
  05907c18_a40e_a5a9_c7c3_5faba98e1e87["crate::extractor::machine::"]
  cb4ab49e_1e98_295d_47fb_b3820e774321 --> 05907c18_a40e_a5a9_c7c3_5faba98e1e87
  a9543d97_3c7c_6fd9_c321_31e9bf0f6c55["crate::extractor::modifier_machine::ModifierMachine"]
  cb4ab49e_1e98_295d_47fb_b3820e774321 --> a9543d97_3c7c_6fd9_c321_31e9bf0f6c55
  7a907858_c7d2_db19_0e89_e3d1d2242e48["classification_macros::ClassifyBytes"]
  cb4ab49e_1e98_295d_47fb_b3820e774321 --> 7a907858_c7d2_db19_0e89_e3d1d2242e48
  142fa702_89b6_67b8_98c2_0b9511d45aa0["std::marker::PhantomData"]
  cb4ab49e_1e98_295d_47fb_b3820e774321 --> 142fa702_89b6_67b8_98c2_0b9511d45aa0
  4d153f79_f78b_b66c_1e8a_11a0eb99bd41["crate::extractor::machine::Machine"]
  cb4ab49e_1e98_295d_47fb_b3820e774321 --> 4d153f79_f78b_b66c_1e8a_11a0eb99bd41
  433675ca_8d0e_feff_42a5_b3f666878cca["pretty_assertions::assert_eq"]
  cb4ab49e_1e98_295d_47fb_b3820e774321 --> 433675ca_8d0e_feff_42a5_b3f666878cca
  style cb4ab49e_1e98_295d_47fb_b3820e774321 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

use crate::cursor;
use crate::extractor::arbitrary_value_machine::ArbitraryValueMachine;
use crate::extractor::arbitrary_variable_machine::ArbitraryVariableMachine;
use crate::extractor::machine::{Machine, MachineState};
use crate::extractor::modifier_machine::ModifierMachine;
use classification_macros::ClassifyBytes;
use std::marker::PhantomData;

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

/// Parsing a variant
#[derive(Debug, Default)]
pub struct ParsingState;

/// Parsing a modifier
///
/// E.g.:
///
/// ```text
/// group-hover/name:
///            ^^^^^
/// ```
///
#[derive(Debug, Default)]
pub struct ParsingModifierState;

/// Parsing the end of a variant
///
/// E.g.:
///
/// ```text
/// hover:
///      ^
/// ```
#[derive(Debug, Default)]
pub struct ParsingEndState;

/// Extract named variants from an input including the `:`.
///
/// E.g.:
///
/// ```text
/// hover:flex
/// ^^^^^^
///
/// data-[state=pending]:flex
/// ^^^^^^^^^^^^^^^^^^^^^
///
/// supports-(--my-variable):flex
/// ^^^^^^^^^^^^^^^^^^^^^^^^^
/// ```
#[derive(Debug, Default)]
pub struct NamedVariantMachine<State = IdleState> {
    /// Start position of the variant
    start_pos: usize,

    arbitrary_variable_machine: ArbitraryVariableMachine,
    arbitrary_value_machine: ArbitraryValueMachine,
    modifier_machine: ModifierMachine,
// ... (363 more lines)

Domain

Subdomains

Dependencies

  • classification_macros::ClassifyBytes
  • crate::cursor
  • crate::extractor::arbitrary_value_machine::ArbitraryValueMachine
  • crate::extractor::arbitrary_variable_machine::ArbitraryVariableMachine
  • crate::extractor::machine::
  • crate::extractor::machine::Machine
  • crate::extractor::modifier_machine::ModifierMachine
  • pretty_assertions::assert_eq
  • std::marker::PhantomData
  • super::

Frequently Asked Questions

What does named_variant_machine.rs do?
named_variant_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 named_variant_machine.rs?
named_variant_machine.rs defines 6 function(s): next, parse_arbitrary_end, reset, test_named_variant_extraction, test_named_variant_machine_performance, transition.
What does named_variant_machine.rs depend on?
named_variant_machine.rs imports 10 module(s): classification_macros::ClassifyBytes, crate::cursor, crate::extractor::arbitrary_value_machine::ArbitraryValueMachine, crate::extractor::arbitrary_variable_machine::ArbitraryVariableMachine, crate::extractor::machine::, crate::extractor::machine::Machine, crate::extractor::modifier_machine::ModifierMachine, pretty_assertions::assert_eq, and 2 more.
Where is named_variant_machine.rs in the architecture?
named_variant_machine.rs is located at crates/oxide/src/extractor/named_variant_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