Function parse_less
Source pub fn parse_less(source: &str) -> Result<String, String>
Expand description
解析LESS字符串并将其转换为CSS
§返回值
返回转换后的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),
}