lang: some small, unfinished stuff

This commit is contained in:
Schrottkatze 2024-04-07 01:04:02 +02:00
commit 8d7401531e
No known key found for this signature in database
3 changed files with 13 additions and 20 deletions

View file

@ -10,6 +10,10 @@ pub enum Token<'a> {
// so a declaration needs the keyword def until i can figure this out
#[token("def")]
Def,
#[token("let")]
Let,
#[token("in")]
In,
#[regex("[a-zA-Z0-9_\\-]+", |lex| lex.slice())]
Word(&'a str),
#[regex("\\$[a-zA-Z0-9_\\-]+", |lex| &lex.slice()[1..])]