Ruta graveolens  ·  notes from a language experiment  ·  cultivated since 2025

Comments

Line comments begin with // and extend to the end of the line.

any_char_except_newline = ? any character except '\n' or '\r' ? ;
newline = "\r\n" | "\n" | "\r" ;
line_comment = "//" { any_char_except_newline } [ newline ] ;

Comments are discarded during lexical analysis and do not affect program semantics.

// This is a comment
fn main() -> i32 {
    42  // This is also a comment
}

Block comments (/* ... */) are not currently supported.