mirror of
https://github.com/Noratrieb/ub.git
synced 2026-01-15 00:55:04 +01:00
some parsing things
This commit is contained in:
parent
1bd5859f0c
commit
4aabcdfd76
8 changed files with 320 additions and 72 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue