diff options
| author | Mike Buland <mike@xagasoft.com> | 2026-06-11 13:42:31 -0700 |
|---|---|---|
| committer | Mike Buland <mike@xagasoft.com> | 2026-06-11 13:42:31 -0700 |
| commit | c9889f7c6622def3b6badde2738c3e912b48144f (patch) | |
| tree | 35eb83eb7b9eee530512f84c73640d16ffc1a6de /src/lexer.rs | |
| parent | cffacc4dc4a46b525250772e87fd69a2f1c64dc2 (diff) | |
| download | crimtag-c9889f7c6622def3b6badde2738c3e912b48144f.tar.gz crimtag-c9889f7c6622def3b6badde2738c3e912b48144f.tar.bz2 crimtag-c9889f7c6622def3b6badde2738c3e912b48144f.tar.xz crimtag-c9889f7c6622def3b6badde2738c3e912b48144f.zip | |
Basic if statements work.
I need to tweak the parser to get mid-tags working, then we can have
else, and maybe elif.
After that is expressions.
Diffstat (limited to 'src/lexer.rs')
| -rw-r--r-- | src/lexer.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lexer.rs b/src/lexer.rs index 2fa29ce..2bf7e9e 100644 --- a/src/lexer.rs +++ b/src/lexer.rs | |||
| @@ -23,7 +23,7 @@ pub enum SymbolType<'a> { | |||
| 23 | Equals, | 23 | Equals, |
| 24 | Period, | 24 | Period, |
| 25 | If, | 25 | If, |
| 26 | ElseIf, | 26 | ElIf, |
| 27 | Else, | 27 | Else, |
| 28 | Token(&'a str), | 28 | Token(&'a str), |
| 29 | Literal(&'a str), | 29 | Literal(&'a str), |
| @@ -250,7 +250,7 @@ impl<'a> Lexer<'a> { | |||
| 250 | "output" => SymbolType::Output, | 250 | "output" => SymbolType::Output, |
| 251 | "loop" => SymbolType::Loop, | 251 | "loop" => SymbolType::Loop, |
| 252 | "if" => SymbolType::If, | 252 | "if" => SymbolType::If, |
| 253 | "elseif" => SymbolType::ElseIf, | 253 | "elif" => SymbolType::ElIf, |
| 254 | "else" => SymbolType::Else, | 254 | "else" => SymbolType::Else, |
| 255 | _ => SymbolType::Token(s) | 255 | _ => SymbolType::Token(s) |
| 256 | }, start_pos, end_pos )) | 256 | }, start_pos, end_pos )) |
