Commit Graph

6 Commits

Author SHA1 Message Date
c43ecf00d1 token::token_data::Data: Renamed from token::TokenData
& Moved into its own module
+ Added token::preamble; common imports when working with Token
2023-10-23 19:43:16 -05:00
b5abd2bff1 Lexer rewrite:
- Scan the input string *linearly*, without backtracking
  - Peek at most one character (unicode code-point) ahead
- Store data (unescaped string literals and chars, identifiers, integers, floats) inside Token
  - This unfortunately makes tokens non-Copy
- Refactor Parser to accommodate these changes
  - On the bright side, Parser no longer needs a reference to the text!
- Write a new set of lexer tests
  - TODO: write a new set of token tests using tokendata

Every day, we get closer to parsing `dummy.cl`!
2023-10-22 18:28:20 -05:00
1e5f7149d9 Token: Add range operators, rename for consistency 2023-10-20 17:09:14 -05:00
34525ec77a lexer: Only allow lines up to 4GB in size. Saves 8 bytes per token 2023-10-20 15:34:54 -05:00
7f7393d2c6 conlang: Grammatical cleanup; merge control flow expressions 2023-10-19 14:40:03 -05:00
5d9c45c26a token: Move module into file 2023-10-17 13:23:34 -05:00