Function parse_less

Source
pub fn parse_less(source: &str) -> Result<String, String>
Expand description

解析LESS字符串并将其转换为CSS

§参数

  • source - 要解析的LESS源代码字符串

§返回值

返回转换后的CSS字符串,如果解析失败则返回错误

§示例

use rust_less::parse_less;

let less = ".selector { @width: 100px; width: @width; }";
match parse_less(less) {
    Ok(css) => println!("Generated CSS: {}", css),
    Err(e) => eprintln!("Error: {}", e),
}