some parsing things

This commit is contained in:
nora 2022-03-23 22:07:36 +01:00
parent 1bd5859f0c
commit 4aabcdfd76
8 changed files with 320 additions and 72 deletions

View file

@ -58,6 +58,10 @@ pub enum Token<'a> {
AndAnd,
#[token("^")]
Caret,
#[token("->")]
Arrow,
#[token(":")]
Colon,
// keywords
#[token("struct")]
@ -102,7 +106,7 @@ mod tests {
#[test]
fn punctuation() {
let tokens = lex_test("{} [] () .,; = == != >= <= < > + - * / | || & && ^");
let tokens = lex_test("{} [] () .,; = == != >= <= < > + - * / | || & && ^ -> :");
insta::assert_debug_snapshot!(tokens);
}