Aryadev Chavali
1145b97c4c
Token to_string now include source name and is printed error style
...
So instead of the previous weird format, we have the format
<source_name>:<line>:<column>: <TYPE> which also allows me to quickly
go to that token via Emacs' (compile).
2024-07-06 17:36:58 +01:00
Aryadev Chavali
f9acb23671
Lexer errors contain the source name and tokenise_symbol refactor
2024-07-05 22:47:25 +01:00
Aryadev Chavali
036ac03176
Lexer tokens now include source name as part of the token
2024-07-05 18:18:11 +01:00
Aryadev Chavali
65ce50f620
Fix copyright notices and includes
2024-07-03 16:55:19 +01:00
Aryadev Chavali
15d39dcfe7
Reworked lexer to deal with invalid type suffixes
...
Now ~push.magic~ will result in an error about it being an invalid
type suffix.
2024-07-03 16:55:19 +01:00
Aryadev Chavali
76bb5ec7d9
(Lexer)+to_string functions for Err, Err::Type
2024-06-01 13:53:54 +01:00
Aryadev Chavali
4625b3b7a5
(Lexer)+to_string functions for Token, Token::Type
2024-06-01 13:51:10 +01:00
Aryadev Chavali
a4689f9dd0
Lexer call pattern is now Err return with reference to token
2024-06-01 13:40:17 +01:00
Aryadev Chavali
7e9af309e3
lerr_t and lerr_type_t -> Lexer::Err and Lexer::Err::Type
2024-06-01 13:40:17 +01:00
Aryadev Chavali
4b85f90a52
Namespace the lexer module
...
Future proofing any name collisions.
2024-06-01 01:52:17 +01:00
Aryadev Chavali
83ad8b832b
token_type_t -> Token::Type
...
Implicit namespacing using the struct
2024-06-01 01:49:24 +01:00
Aryadev Chavali
f5d8777b7a
token_t -> Token
...
Use C++'s implicit typedef
2024-06-01 01:48:11 +01:00
Aryadev Chavali
f3f7578811
Update lexer trivially
...
HALT is now an opcode, which we deal with already.
2024-06-01 01:47:16 +01:00
Aryadev Chavali
f060a856d3
Fixed Makefile so it tracks dependencies better
...
It now tracks main.cpp's dependencies and rebuilds them as needed.
2024-04-16 20:42:51 +06:30