lang: parse pipelines

This commit is contained in:
Schrottkatze 2024-05-04 21:44:02 +02:00
commit afd493be16
No known key found for this signature in database
3 changed files with 48 additions and 38 deletions

View file

@ -19,10 +19,21 @@ pub fn lex(src: &str) -> Vec<(SyntaxKind, &str)> {
pub enum SyntaxKind {
#[token("def")]
DEF_KW = 0,
DEF,
DEF_NAME,
DEF_BODY,
#[token("let")]
LET_KW,
#[token("in")]
IN_KW,
LET_IN,
#[token("mod")]
MOD_KW,
MODULE,
MODULE_BODY,
#[token("use")]
USE_KW,
USE_PAT,
#[regex("[\\d]+")]
INT_NUM,
#[regex("[+-]?([\\d]+\\.[\\d]*|[\\d]*\\.[\\d]+)")]