diff options
author | JJ | 2023-12-28 10:18:50 +0000 |
---|---|---|
committer | JJ | 2023-12-28 10:40:26 +0000 |
commit | 774a35ae21dada36af48ae32c862b22587fba107 (patch) | |
tree | 5dfc8153a061192cab76ebaa6c56615dac9e4b09 /src | |
parent | 0121346e894fb0e7f60312b16986d82109e4d86b (diff) |
docs: sweeping changes. cement an understanding of error handling, async, modules, and unions. rewrite documentation on interfaces. complete the introductory overview. many minor cleanups.
Diffstat (limited to 'src')
-rw-r--r-- | src/frontend/lex.rs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/frontend/lex.rs b/src/frontend/lex.rs index f751c63..e0aa76d 100644 --- a/src/frontend/lex.rs +++ b/src/frontend/lex.rs @@ -31,12 +31,13 @@ impl std::error::Error for LexicalError {} /// **Basic** syntax tokens. Form an unambiguous TokenStream. #[derive(Clone, PartialEq)] pub enum Token { - Key(Keyword), // keyword identifiers. - Word(String), // non-keyword identifiers. - Num(String), // numeric value, ex. 413, 0b101011, 0xabcd - Lit(Literal), // literal value, ex. for strings/comments. - Sep(Punctuation), // punctuation. non-word tokens. operators are lexed as this and later transformed to words. - Indent(usize), // indentation. denotes line breaks and scope at which a line starts. + Key(Keyword), // keyword identifiers. + Word(String), // non-keyword identifiers. + Op(String), // operators. separate tokens lexographically so the parser knows to parse infix notation. + Num(String), // numeric value, ex. 413, 0b101011, 0xabcd + Lit(Literal), // literal value, ex. for strings/comments. + Sep(Punctuation), // punctuation. non-word tokens. ~~operators are lexed as this and later transformed to words.~~ + Indent(usize), // indentation. denotes line breaks and scope at which a line starts. } #[derive(Clone, PartialEq)] |