Home / File/ haml.rs — tailwindcss Source File

haml.rs — tailwindcss Source File

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

File rust Oxide PreProcessors 9 imports 8 functions

Entity Profile

Dependency Diagram

graph LR
  a8f656ed_d21d_021d_f2d0_b35406335f14["haml.rs"]
  1c4eed22_4d95_f263_e9e7_c0ce8a08d16b["super::Haml"]
  a8f656ed_d21d_021d_f2d0_b35406335f14 --> 1c4eed22_4d95_f263_e9e7_c0ce8a08d16b
  96a36755_a007_15e1_ec6c_526c02d24b9b["crate::cursor"]
  a8f656ed_d21d_021d_f2d0_b35406335f14 --> 96a36755_a007_15e1_ec6c_526c02d24b9b
  c4d29b89_2191_f275_13fb_7cf117340055["crate::extractor::bracket_stack::BracketStack"]
  a8f656ed_d21d_021d_f2d0_b35406335f14 --> c4d29b89_2191_f275_13fb_7cf117340055
  05907c18_a40e_a5a9_c7c3_5faba98e1e87["crate::extractor::machine::"]
  a8f656ed_d21d_021d_f2d0_b35406335f14 --> 05907c18_a40e_a5a9_c7c3_5faba98e1e87
  ed5b6564_5e78_f7bf_cdc6_b0150d9116c1["crate::extractor::pre_processors::pre_processor::PreProcessor"]
  a8f656ed_d21d_021d_f2d0_b35406335f14 --> ed5b6564_5e78_f7bf_cdc6_b0150d9116c1
  087ad9fa_43e6_1338_b489_014631bd4014["crate::extractor::variant_machine::VariantMachine"]
  a8f656ed_d21d_021d_f2d0_b35406335f14 --> 087ad9fa_43e6_1338_b489_014631bd4014
  31c3994f_a10b_9230_4730_a596a4e7c40d["crate::scanner::pre_process_input"]
  a8f656ed_d21d_021d_f2d0_b35406335f14 --> 31c3994f_a10b_9230_4730_a596a4e7c40d
  f799c3c8_4426_1389_085e_d75f31945865["bstr::ByteVec"]
  a8f656ed_d21d_021d_f2d0_b35406335f14 --> f799c3c8_4426_1389_085e_d75f31945865
  433675ca_8d0e_feff_42a5_b3f666878cca["pretty_assertions::assert_eq"]
  a8f656ed_d21d_021d_f2d0_b35406335f14 --> 433675ca_8d0e_feff_42a5_b3f666878cca
  style a8f656ed_d21d_021d_f2d0_b35406335f14 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

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

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 Oxide 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: Oxide, 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