News for hackers. Stuff that matters.
Re:Rust-sitter: Define your entire tree-sitter grammar in Ru... by shadaj on Wednesday February 22, 2023 @12:22PM (#34899059)
We support optional elements by wrapping them in `Option<T>` (other annotations are applied to the contents of the option)! So you can define

  struct ... {
    ...
    #[rust_sitter::leaf(text = ",")
    _dangling_comma: Option<()>
  }
Re:Rust-sitter: Define your entire tree-sitter grammar in Ru... by mcluck on Wednesday February 22, 2023 @04:24PM (#34903019)
Perfect, thanks!