Skip to main content

Module fmt

Module fmt 

Source
Expand description

Code formatter for QuantaLang.

This module provides automatic code formatting following the QuantaLang style guide:

  • Consistent indentation (4 spaces by default)
  • Proper spacing around operators and keywords
  • Line length management (100 chars default)
  • Import organization
  • Trailing comma normalization

§Usage

use quantalang::fmt::{Formatter, FormatConfig};

let config = FormatConfig::default();
let formatter = Formatter::new(config);
let formatted = formatter.format_str(source)?;

Re-exports§

pub use config::*;
pub use formatter::*;
pub use pretty::*;

Modules§

config
Formatter configuration and options.
formatter
Main formatter implementation for QuantaLang source code.
pretty
Pretty printer for generating formatted output.