rustyle 0.1.0

A new way to represent the CSS stylesheet in Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use proc_macro::Span;

pub trait Node {
  fn name(&self) -> &'static str;

  fn generate_code(&self, base_class: &str) -> String {
    Span::call_site()
      .error(format!(
        "CodeGenerator not implemented for '{}', at css class '{}'",
        self.name(),
        base_class
      ))
      .emit();

    String::new()
  }
}