41 Commits

Author SHA1 Message Date
Pasha Bibko
a1de06adbd Added IfBranch class 2025-06-16 17:06:06 +01:00
Pasha Bibko
b3e63beae1 Fixed a couple of issues with operations 2025-06-08 18:05:07 +01:00
Pasha Bibko
2a47fd1756 Now supports function calling 2025-05-11 15:17:07 +01:00
Pasha Bibko
c47889a4ff Function parameters can now be read 2025-05-10 15:09:50 +01:00
Pasha Bibko
9e9606681f Removed how variables were handled 2025-05-10 13:39:25 +01:00
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
794173e14f Variables can now have an initializer 2025-05-08 15:04:01 +01:00
Pasha Bibko
094101ffdd Improved logging capabilities 2025-05-08 14:32:33 +01:00
Pasha Bibko
4509250c4e Tided up Parser project 2025-05-07 20:33:39 +01:00
Pasha Bibko
c472cb5fc5 Changed to use concepts instead of static_assert 2025-05-07 19:43:09 +01:00
Pasha Bibko
6783564f10 Fixed Unexpected Token crashing the process 2025-05-07 16:53:10 +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
a16ce34c8b Small changes 2025-05-04 20:12:44 +01:00
Pasha Bibko
e12088979d Added support for all basic math operators 2025-04-28 21:43:52 +01:00
Pasha Bibko
d0bb16f263 Added 2 comments 2025-04-28 21:28:15 +01:00
Pasha Bibko
ce8f1619a4 Variables can now be read from 2025-04-28 21:16:54 +01:00
Pasha Bibko
cbc179411a VarDec and VarAssign now work 2025-04-28 20:43:41 +01:00
Pasha Bibko
3ec6cc0c6e Added VarAssign, VarAccess and MultiNode 2025-04-28 19:59:45 +01:00
Pasha Bibko
935cb35715 Allowed parser to parse basic variable declarations 2025-04-27 21:58:23 +01:00
Pasha Bibko
88ce75ceb1 Changed how scopes work
Also added logging and GenIR functions for VariableDeclaration
2025-04-27 21:48:16 +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
8e1fa45a44 Made project work with new organisation 2025-04-22 11:23:30 +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
c8001a3a58 Made the process actually output to the file 2025-04-21 15:56:10 +01:00
Pasha Bibko
49e4bba510 Improved lexer debugging 2025-04-21 14:23:47 +01:00
Pasha Bibko
a560c53c58 Fixed previous commit
Also allows multiple things to be added together
2025-04-21 09:50:29 +01:00
Pasha Bibko
934f287b7f Merge branch 'LLVM-Test' 2025-04-20 19:32:56 +01:00
Pasha Bibko
6ba9f8e596 Improved compile times
Added A LOT of comments
2025-04-20 19:32:25 +01:00
Pasha Bibko
680a3d1323 LLVM-Works 2025-04-20 13:49:43 +01:00
Pasha Bibko
b3373a858c Removed LLVM 2025-04-19 11:41:52 +01:00
Pasha Bibko
14b2b36748 IT CRASHES
WHYYYYYYYYYYYYYYYYYYYYYY
2025-04-17 18:34:56 +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
84f2a4cc5e Added token class
Also added a couple of foward declarations for faster compiles
2025-04-17 11:40:00 +01:00
Pasha Bibko
f28b81ab87 Started adding Parser 2025-04-16 20:00:28 +01:00