Commit Graph

297 Commits (bf48ee7b830fac4c03718eb5af59ed3849393bb0)

Author SHA1 Message Date
Tristan B. V. Kildaire 1af072de8c Added some more things 2021-03-27 15:27:14 +02:00
Tristan B. Kildaire 5761a454a8 Added name resolver
Sub-typed Clazz to Container

Updated test case
2021-03-24 23:19:40 +02:00
Tristan B. Kildaire 31fe91d947 Added statement from parseAccessor call 2021-03-24 23:17:58 +02:00
Tristan B. Kildaire e663a0792b In `parseBody()` after calling `parseClass` add the statement generated 2021-03-24 21:50:06 +02:00
Tristan B. Kildaire 4b9ca7588f TypedEntity now houses `type` field for use by Function as returnType and for use by Variable for `type` 2021-03-23 21:46:27 +02:00
Tristan B. Kildaire 5c8e30f1f5 Run type checker system
WIP: Resolution of names

Reworked type hierachy for Enity in relation to Function, Variable and Class

Updated test case
2021-03-23 21:35:13 +02:00
Tristan B. Kildaire 69afebbe04 Add parameters to function 2021-03-22 11:18:56 +02:00
Tristan B. V. Kildaire c02791d748 Return Entity with correct AccessorType set 2021-03-21 22:51:42 +02:00
Tristan B. V. Kildaire 293399722c WIP Accessor types 2021-03-21 22:26:48 +02:00
Tristan B. V. Kildaire f4550a77fc Return Statement from `parseAccessor()` 2021-03-21 22:01:54 +02:00
Tristan B. V. Kildaire b04060af80 Added getAllOf(Type) function 2021-03-21 22:01:38 +02:00
Tristan B. V. Kildaire f1d1f7d610 Wrong input type fixed in TypeChecker, now all functions, globals and class definitions can br printed out 2021-03-21 22:01:28 +02:00
Tristan B. V. Kildaire 779a76acb6 Implemented `getGlobals()` for Program which will return all Variable objects representing variables defined globally 2021-03-21 21:44:22 +02:00
Tristan B. V. Kildaire 87f7f458c8 Call type checker 2021-03-21 21:43:05 +02:00
Tristan B. V. Kildaire 3165f46416 Added type checker 2021-03-21 21:43:01 +02:00
Tristan B. V. Kildaire db4dd757eb Null was there because of bug, that should never happen though so I want to unmask any future bugs. 2021-03-21 21:42:53 +02:00
Tristan B. V. Kildaire a979d560c3 WIP: Symbol table additions 2021-03-21 17:57:56 +02:00
Tristan B. Kildaire 855be6f8f0 We will rather return Variable and modify in `parseAccessor`. And if not then we set to default 2021-03-21 15:56:51 +02:00
Tristan B. V. Kildaire bc2f92a9f0 Fixed unit tests 2021-03-21 14:27:31 +02:00
Tristan B. V. Kildaire 91e326d517 Added some temporary (going to change them later) unit tests for the parser 2021-03-21 14:23:18 +02:00
Tristan B. V. Kildaire 8fe1737433 Added support for accessors to nested classes, classes and variables
Updated test case respectively
2021-03-21 14:03:13 +02:00
Tristan B. V. Kildaire 7adf0aad12 Added check for accessor 2021-03-21 13:32:51 +02:00
Tristan B. V. Kildaire 5121e60092 Should have not been static
Added `PROCTECTED` symbol

Added `isAccessor` to check whether or not the given token is an accessor type
2021-03-21 13:32:48 +02:00
Tristan B. V. Kildaire 72616d4354 Updated test case to add missing module header 2021-03-21 13:11:12 +02:00
Tristan B. V. Kildaire 8bde36d586 Added requirement for having a module header at the beginning of each source file
Updated test cases accordingly
2021-03-21 13:10:18 +02:00
Tristan B. V. Kildaire 85ab9bde02 Added AcessorType enum and FunctionType enum 2021-03-21 13:01:09 +02:00
Tristan B. V. Kildaire f1b7a39751 Added some future data structure stubs for type checking 2021-03-21 13:00:56 +02:00
Tristan B. V. Kildaire fb818c3c86 Added TODO 2021-03-21 12:39:55 +02:00
Tristan B. V. Kildaire a004ff0233 WIP: Accessors for variable declarations, function definitions and class definitions 2021-03-21 12:39:29 +02:00
Tristan B. V. Kildaire c7b2d1663f Added TODO 2021-03-21 12:30:23 +02:00
Tristan B. V. Kildaire 8efeb9a3fb Fixed function argument parsing 2021-03-21 10:02:23 +02:00
Tristan B. V. Kildaire 4e91bdf6fd Updated test case for class parsing 2021-03-21 09:45:57 +02:00
Tristan B. V. Kildaire 9f6dd813c8 Added support for class inheritance parsing 2021-03-21 09:45:40 +02:00
Tristan B. Kildaire ceffcd7b9c Clean up 2021-03-20 21:26:42 +02:00
Tristan B. V. Kildaire bf1f6fafa7 Removed uneeded stuff 2021-03-20 21:47:35 +02:00
Tristan B. V. Kildaire 43050f9d3f Cleaned up 2021-03-20 18:50:48 +02:00
Tristan B. V. Kildaire a911141da9 Added new test case for if-statement parsing to test lone else's and else if's 2021-03-20 18:43:22 +02:00
Tristan B. V. Kildaire eaf359ec2d Updated test case 2021-03-20 18:42:16 +02:00
Tristan B. V. Kildaire 88a5528070 Updated test cases for testing if-statement parsing 2021-03-20 18:41:35 +02:00
Tristan B. V. Kildaire 35132be9d6 If statement parsing completed
Also on unknown symbol in `parseBody` remember to error out and exit
2021-03-20 18:41:26 +02:00
Tristan B. V. Kildaire 70bdeed89b WIP: If statement parsing seems to work and pick up some errors 2021-03-20 18:38:16 +02:00
Tristan B. V. Kildaire bbe52bb287 Exit after else 2021-03-20 18:36:25 +02:00
Tristan B. V. Kildaire 6edae88d76 We would never not start on an if, hence said variable would always be true 2021-03-20 18:31:20 +02:00
Tristan B. V. Kildaire 2873a6ab4e Cleaned up 2021-03-20 18:31:03 +02:00
Tristan B. V. Kildaire 1121f2d84e Updated test case 2021-03-20 15:25:48 +02:00
Tristan B. V. Kildaire 0ccadf51d4 Updated test case 2021-03-20 15:24:44 +02:00
Tristan B. V. Kildaire 5874a4c801 Fixed if statement parsing bug 2021-03-20 15:24:39 +02:00
Tristan B. Kildaire 7882b49c72 Removed redundancy 2021-03-18 21:06:18 +02:00
Tristan B. Kildaire 808c124724 WIP: If statements
Something is consuming too much if statement wise (only when `else` is present though)
2021-03-18 21:06:10 +02:00
Tristan B. Kildaire 4322c2aa0c WIP: If statement with else if's and else 2021-03-18 19:20:17 +02:00