Commit Graph

375 Commits (d9566698d231f0c228b030ea280147e4670ef484)

Author SHA1 Message Date
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
Tristan B. V. Kildaire 9c22731098 Bruh 2021-03-17 22:25:07 +02:00
Tristan B. Kildaire b84ee81e7b Revert 2021-03-17 10:33:22 +02:00
Tristan B. Kildaire 9763a85478 Expect now throws an exception 2021-03-17 10:05:56 +02:00
Tristan B. Kildaire 5330ee95f1 Upgraded to new gogga 2021-03-17 10:05:36 +02:00
Tristan B. V. Kildaire 034129162f Updated test case 2021-03-16 13:34:11 +02:00
Tristan B. Kildaire 81a4c0537b Multiple function declarations can now be parsed, previous error was due to exiting only when we were out of tokens, now we exit after consuming `}` after the call to parseBody() 2021-03-16 10:57:04 +02:00
Tristan B. Kildaire 0ea5b78a2f Bruh 2021-03-16 10:36:50 +02:00
Tristan B. Kildaire b6467583a1 Updated test case 2021-03-16 10:36:45 +02:00
Tristan B. V. Kildaire d89e999958 Cleaned up 2021-03-16 07:30:18 +02:00
Tristan B. Kildaire 18a5bdca16 Added recursive brace parsing for parseExpression()
Updated test case to test it
2021-03-15 11:29:05 +02:00
Tristan B. Kildaire e5b86498f5 Added TODO about parseExpression for recursive () parsing 2021-03-15 10:50:06 +02:00
Tristan B. Kildaire b7f77b8619 parseExpression fixed for termination
Updated test cases to test this
2021-03-15 10:46:00 +02:00
Tristan B. V. Kildaire 0cc1b2e4ea Added TODO 2021-03-05 12:56:36 +02:00
Tristan B. V. Kildaire 6267ba1505 Added more enter/leave debug messages 2021-03-05 12:35:58 +02:00
Tristan B. V. Kildaire 2b7dd2fce3 Added unittest for identifiers 2021-03-05 12:12:05 +02:00
Tristan B. V. Kildaire bfdbaaeee7 Replaced old expect messages with new `expect(string)` 2021-03-05 12:03:31 +02:00
Tristan B. V. Kildaire 4ed0b385cf Added new `expect(string)` method for custom messages for panic
Also made `expect(SymbolType, Token)` use said new method
2021-03-05 12:01:57 +02:00
Tristan B. V. Kildaire 88a5c0e482 Added enter and leave debug prints to `parseBody()` 2021-03-05 12:00:13 +02:00
Tristan B. V. Kildaire 2cdc53e9b6 Cleaned up debug prints for `parseIf` and `parseWhile` 2021-03-05 11:58:51 +02:00
Tristan B. V. Kildaire f547a1127d Added TODO for `parseExpression` - found possible way to implement expression parsing correctly 2021-03-05 11:46:51 +02:00
Tristan B. V. Kildaire 94f15af031 Made token movement for `parseIf` and `parseWhile` self-contained 2021-03-05 11:40:06 +02:00
Tristan B. V. Kildaire 847f76d7d2 Cleaned up `parseClass` 2021-03-05 11:38:00 +02:00