named_utility_machine.rs — tailwindcss Source File
Architecture documentation for named_utility_machine.rs, a rust file in the tailwindcss codebase. 10 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 6aee7b35_5cf2_f7f8_bf0f_b00b0ab22046["named_utility_machine.rs"] 12eefb39_12aa_f996_7af1_5862bf52586f["super::"] 6aee7b35_5cf2_f7f8_bf0f_b00b0ab22046 --> 12eefb39_12aa_f996_7af1_5862bf52586f 96a36755_a007_15e1_ec6c_526c02d24b9b["crate::cursor"] 6aee7b35_5cf2_f7f8_bf0f_b00b0ab22046 --> 96a36755_a007_15e1_ec6c_526c02d24b9b ec3c2d9b_617f_ce45_34ee_554128afd65f["crate::extractor::arbitrary_value_machine::ArbitraryValueMachine"] 6aee7b35_5cf2_f7f8_bf0f_b00b0ab22046 --> ec3c2d9b_617f_ce45_34ee_554128afd65f 9827a250_2729_b49f_1d1f_5a8965ab90ba["crate::extractor::arbitrary_variable_machine::ArbitraryVariableMachine"] 6aee7b35_5cf2_f7f8_bf0f_b00b0ab22046 --> 9827a250_2729_b49f_1d1f_5a8965ab90ba 73591046_2290_5d1b_5950_7b966296b204["crate::extractor::boundary::is_valid_after_boundary"] 6aee7b35_5cf2_f7f8_bf0f_b00b0ab22046 --> 73591046_2290_5d1b_5950_7b966296b204 05907c18_a40e_a5a9_c7c3_5faba98e1e87["crate::extractor::machine::"] 6aee7b35_5cf2_f7f8_bf0f_b00b0ab22046 --> 05907c18_a40e_a5a9_c7c3_5faba98e1e87 7a907858_c7d2_db19_0e89_e3d1d2242e48["classification_macros::ClassifyBytes"] 6aee7b35_5cf2_f7f8_bf0f_b00b0ab22046 --> 7a907858_c7d2_db19_0e89_e3d1d2242e48 142fa702_89b6_67b8_98c2_0b9511d45aa0["std::marker::PhantomData"] 6aee7b35_5cf2_f7f8_bf0f_b00b0ab22046 --> 142fa702_89b6_67b8_98c2_0b9511d45aa0 4d153f79_f78b_b66c_1e8a_11a0eb99bd41["crate::extractor::machine::Machine"] 6aee7b35_5cf2_f7f8_bf0f_b00b0ab22046 --> 4d153f79_f78b_b66c_1e8a_11a0eb99bd41 433675ca_8d0e_feff_42a5_b3f666878cca["pretty_assertions::assert_eq"] 6aee7b35_5cf2_f7f8_bf0f_b00b0ab22046 --> 433675ca_8d0e_feff_42a5_b3f666878cca style 6aee7b35_5cf2_f7f8_bf0f_b00b0ab22046 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::boundary::is_valid_after_boundary;
use crate::extractor::machine::{Machine, MachineState};
use classification_macros::ClassifyBytes;
use std::marker::PhantomData;
#[derive(Debug, Default)]
pub struct IdleState;
#[derive(Debug, Default)]
pub struct ParsingState;
/// Extracts named utilities from an input.
///
/// E.g.:
///
/// ```text
/// flex
/// ^^^^
///
/// bg-red-500
/// ^^^^^^^^^^
/// ```
#[derive(Debug, Default)]
pub struct NamedUtilityMachine<State = IdleState> {
/// Start position of the utility
start_pos: usize,
arbitrary_variable_machine: ArbitraryVariableMachine,
arbitrary_value_machine: ArbitraryValueMachine,
_state: PhantomData<State>,
}
impl<State> NamedUtilityMachine<State> {
#[inline(always)]
fn transition<NextState>(&self) -> NamedUtilityMachine<NextState> {
NamedUtilityMachine {
start_pos: self.start_pos,
arbitrary_variable_machine: Default::default(),
arbitrary_value_machine: Default::default(),
_state: PhantomData,
}
}
}
impl Machine for NamedUtilityMachine<IdleState> {
#[inline(always)]
fn reset(&mut self) {}
#[inline]
fn next(&mut self, cursor: &mut cursor::Cursor<'_>) -> MachineState {
match cursor.curr.into() {
Class::AlphaLower => match cursor.next.into() {
// Valid single character utility in between quotes
//
// E.g.: `<div class="a"></div>`
// ^
// ... (476 more lines)
Domain
Subdomains
Functions
Dependencies
- classification_macros::ClassifyBytes
- crate::cursor
- crate::extractor::arbitrary_value_machine::ArbitraryValueMachine
- crate::extractor::arbitrary_variable_machine::ArbitraryVariableMachine
- crate::extractor::boundary::is_valid_after_boundary
- crate::extractor::machine::
- crate::extractor::machine::Machine
- pretty_assertions::assert_eq
- std::marker::PhantomData
- super::
Source
Frequently Asked Questions
What does named_utility_machine.rs do?
named_utility_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_utility_machine.rs?
named_utility_machine.rs defines 5 function(s): next, reset, test_named_utility_extraction, test_named_utility_machine_performance, transition.
What does named_utility_machine.rs depend on?
named_utility_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::boundary::is_valid_after_boundary, crate::extractor::machine::, crate::extractor::machine::Machine, pretty_assertions::assert_eq, and 2 more.
Where is named_utility_machine.rs in the architecture?
named_utility_machine.rs is located at crates/oxide/src/extractor/named_utility_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