diff options
| author | Edvard Thörnros <edvard.thornros@gmail.com> | 2021-03-09 19:29:44 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-09 19:29:44 +0100 |
| commit | 345cb8efef31af3e6fda65357fbab25664d385a2 (patch) | |
| tree | 334d923141e1fdb307b9e882373fee58c2be46a6 /src/tokenizer.rs | |
| parent | 44170a579266501143af63960fda8706df809c09 (diff) | |
| parent | 8d4493d0ac314318498155556467d46b6036d863 (diff) | |
| download | sylt-345cb8efef31af3e6fda65357fbab25664d385a2.tar.gz | |
Merge pull request #104 from FredTheDino/union-types
union types
Diffstat (limited to 'src/tokenizer.rs')
| -rw-r--r-- | src/tokenizer.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/tokenizer.rs b/src/tokenizer.rs index 3b61e5f..8b06324 100644 --- a/src/tokenizer.rs +++ b/src/tokenizer.rs @@ -15,6 +15,9 @@ pub enum Token { #[regex(r"[\d]+", |lex| lex.slice().parse())] Int(i64), + #[regex(r"nil")] + Nil, + #[regex(r"true|false", |lex| lex.slice().parse(), priority=2)] Bool(bool), @@ -117,6 +120,10 @@ pub enum Token { Or, #[token("!")] Bang, + #[token("?")] + QuestionMark, + #[token("|")] + Pipe, #[token(",")] Comma, |
