Commit Graph

25 Commits

Author SHA1 Message Date
Pasha Bibko
050eeb5a53 Allowed multiple functions + non "main" functions
Also fixed a bug in the lexer and changed how AST is logged.
2025-05-08 16:03:54 +01:00
Pasha Bibko
141bb1530b Improved logger whilst debugger is active 2025-05-08 14:45:44 +01:00
Pasha Bibko
094101ffdd Improved logging capabilities 2025-05-08 14:32:33 +01:00
Pasha Bibko
c472cb5fc5 Changed to use concepts instead of static_assert 2025-05-07 19:43:09 +01:00
Pasha Bibko
98fc4589ab Cleaned up Lexer 2025-05-07 18:10:15 +01:00
Pasha Bibko
6783564f10 Fixed Unexpected Token crashing the process 2025-05-07 16:53:10 +01:00
Pasha Bibko
4e78a9f6ae Made Lexer errors fully hidden in global scope
Also improved general ease of use with debugging use __debugbreak when an error is thrown.

NOTE: Parser errors currently crash the program
2025-05-07 16:31:44 +01:00
Pasha Bibko
f3a559490c General clean up
- Moved some classes from Lexer.h to seperate (non-Global files)
- Deleted dllmain as it wasn't used for the most part
2025-05-06 17:38:22 +01:00
Pasha Bibko
5339df9b36 Refactored how logging works
Made it central reusable logic. No longer needs to be passed around, opened or closed.
2025-05-05 23:55:22 +01:00
Pasha Bibko
0f11fe006b Made projects use PCHs 2025-05-05 17:17:33 +01:00
Pasha Bibko
c64a2c692c Made common a project 2025-05-05 16:45:34 +01:00
Pasha Bibko
616ed1ca21 Refactored error handling
Now uses base error class which has an abstract function for overiding how it is displayed to the console.
2025-05-05 15:44:59 +01:00
Pasha Bibko
a64aa28432 Added scope class 2025-04-27 21:18:09 +01:00
Pasha Bibko
321a7fea18 Improved syntax for functions
Added logging system for AST nodes as well.
2025-04-24 21:34:30 +01:00
Pasha Bibko
099e543e95 Im vonfused 2025-04-22 22:32:07 +01:00
Pasha Bibko
0a7c2c0145 Organized project files 2025-04-22 11:17:34 +01:00
Pasha Bibko
c95d91b867 Changed how tokens are represented in memory
Also made string-literal tokens now include the quotes as part of their contents.
2025-04-22 10:55:35 +01:00
Pasha Bibko
4b47e803ce Improved logging
Small errors with logging parser unexpected token errors. Tokens need to be re-written with how they store memory as it can be halved.
2025-04-22 00:16:20 +01:00
Pasha Bibko
feea149cc1 Made lexer support floating point numbers
Wow I didn't think the lexer could get worse
2025-04-21 15:40:46 +01:00
Pasha Bibko
49e4bba510 Improved lexer debugging 2025-04-21 14:23:47 +01:00
Pasha Bibko
6ba9f8e596 Improved compile times
Added A LOT of comments
2025-04-20 19:32:25 +01:00
Pasha Bibko
3017e70631 Parser is held together by duck-tape and a wish 2025-04-17 14:47:19 +01:00
Pasha Bibko
e1fce699da Added number literals to Lexer
Also fixed bugs. I really should refactor the mess that is this Lexer.
2025-04-17 13:46:10 +01:00
Pasha Bibko
2f34a23ba2 Fixed bugs in Lexer
Also added basic math operators
2025-04-17 13:04:28 +01:00
Pasha Bibko
4ac5061f03 Added lexer from previous project 2025-04-16 19:32:26 +01:00