haml.rs — tailwindcss Source File
Architecture documentation for haml.rs, a rust file in the tailwindcss codebase. 9 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR ca2cb7f3_129e_2351_7658_5668e9773b08["haml.rs"] 33bee6e5_b3de_5d8f_2920_0497810550f7["super::Haml"] ca2cb7f3_129e_2351_7658_5668e9773b08 --> 33bee6e5_b3de_5d8f_2920_0497810550f7 e4e20bdf_ad1e_e4a0_5cba_d0f5a5db787e["crate::cursor"] ca2cb7f3_129e_2351_7658_5668e9773b08 --> e4e20bdf_ad1e_e4a0_5cba_d0f5a5db787e 94b5420b_055c_efe5_392d_b0d15e43aa35["crate::extractor::bracket_stack::BracketStack"] ca2cb7f3_129e_2351_7658_5668e9773b08 --> 94b5420b_055c_efe5_392d_b0d15e43aa35 cd83abb6_a664_e16d_ddc8_60a3f23ba86a["crate::extractor::machine::"] ca2cb7f3_129e_2351_7658_5668e9773b08 --> cd83abb6_a664_e16d_ddc8_60a3f23ba86a a55fec3d_3fee_4b46_48f2_43f3844c61e4["crate::extractor::pre_processors::pre_processor::PreProcessor"] ca2cb7f3_129e_2351_7658_5668e9773b08 --> a55fec3d_3fee_4b46_48f2_43f3844c61e4 71141c85_3e46_c613_7ae6_deef432b10a2["crate::extractor::variant_machine::VariantMachine"] ca2cb7f3_129e_2351_7658_5668e9773b08 --> 71141c85_3e46_c613_7ae6_deef432b10a2 77ca3446_b0bf_af88_0e9b_c56988f2aef5["crate::scanner::pre_process_input"] ca2cb7f3_129e_2351_7658_5668e9773b08 --> 77ca3446_b0bf_af88_0e9b_c56988f2aef5 79ed493e_0b38_7678_1312_73cb98aa7983["bstr::ByteVec"] ca2cb7f3_129e_2351_7658_5668e9773b08 --> 79ed493e_0b38_7678_1312_73cb98aa7983 e4088d34_b5b4_ec51_b975_557a1536ec76["pretty_assertions::assert_eq"] ca2cb7f3_129e_2351_7658_5668e9773b08 --> e4088d34_b5b4_ec51_b975_557a1536ec76 style ca2cb7f3_129e_2351_7658_5668e9773b08 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::pre_processors::pre_processor::PreProcessor;
use crate::extractor::variant_machine::VariantMachine;
use crate::scanner::pre_process_input;
use bstr::ByteVec;
#[derive(Debug, Default)]
pub struct Haml;
impl PreProcessor for Haml {
fn process(&self, content: &[u8]) -> Vec<u8> {
let len = content.len();
let mut result = content.to_vec();
let mut cursor = cursor::Cursor::new(content);
let mut bracket_stack = BracketStack::default();
// Haml Comments: -#
// https://haml.info/docs/yardoc/file.REFERENCE.html#ruby-evaluation
//
// > The hyphen followed immediately by the pound sign signifies a silent comment. Any text
// > following this isn’t rendered in the resulting document at all.
//
// ```haml
// %p foo
// -# This is a comment
// %p bar
// ```
//
// > You can also nest text beneath a silent comment. None of this text will be rendered.
//
// ```haml
// %p foo
// -#
// This won't be displayed
// Nor will this
// Nor will this.
// %p bar
// ```
//
// Ruby Evaluation
// https://haml.info/docs/yardoc/file.REFERENCE.html#ruby-evaluation
//
// When any of the following characters are the first non-whitespace character on the line,
// then the line is treated as Ruby code:
//
// - Inserting Ruby: =
// https://haml.info/docs/yardoc/file.REFERENCE.html#inserting_ruby
//
// ```haml
// %p
// = ['hi', 'there', 'reader!'].join " "
// = "yo"
// ```
//
// - Running Ruby: -
// https://haml.info/docs/yardoc/file.REFERENCE.html#running-ruby--
//
// ```haml
// ... (407 more lines)
Domain
Subdomains
Functions
Dependencies
- bstr::ByteVec
- crate::cursor
- crate::extractor::bracket_stack::BracketStack
- crate::extractor::machine::
- crate::extractor::pre_processors::pre_processor::PreProcessor
- crate::extractor::variant_machine::VariantMachine
- crate::scanner::pre_process_input
- pretty_assertions::assert_eq
- super::Haml
Source
Frequently Asked Questions
What does haml.rs do?
haml.rs is a source file in the tailwindcss codebase, written in rust. It belongs to the OxideEngine domain, PreProcessors subdomain.
What functions are defined in haml.rs?
haml.rs defines 8 function(s): process, skip_indented_block, test_arbitrary_code_followed_by_classes, test_crash_missing_newline, test_haml_full_file_17051, test_haml_full_file_17813, test_haml_pre_processor, test_strings_only_occur_when_nested.
What does haml.rs depend on?
haml.rs imports 9 module(s): bstr::ByteVec, crate::cursor, crate::extractor::bracket_stack::BracketStack, crate::extractor::machine::, crate::extractor::pre_processors::pre_processor::PreProcessor, crate::extractor::variant_machine::VariantMachine, crate::scanner::pre_process_input, pretty_assertions::assert_eq, and 1 more.
Where is haml.rs in the architecture?
haml.rs is located at crates/oxide/src/extractor/pre_processors/haml.rs (domain: OxideEngine, subdomain: PreProcessors, directory: crates/oxide/src/extractor/pre_processors).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free