Commit Graph

821 Commits

Author SHA1 Message Date
Tristan B. Velloza Kildaire 86905da623 Added TODO 2022-10-14 20:12:28 +02:00
Tristan B. Velloza Kildaire 2031a4645c Context should just be the same one passed in as we are not changing really. 2022-10-14 20:10:57 +02:00
Tristan B. Velloza Kildaire c85aba1f56 WIP 2022-10-14 19:58:33 +02:00
Tristan B. Velloza Kildaire e46950778b Fixes:
- The test case was broken -_-
- Full-path traversal now implemented somewhat, along with checks on the container if they require static initialization (such as for Classes)
2022-10-14 18:45:44 +02:00
Tristan B. Velloza Kildaire 0c104440ae Freeze for now 2022-10-14 18:01:35 +02:00
Tristan B. Velloza Kildaire 05d00ff58b WIP: Seems wrong the order we get back, might need to take some time to think about how to get about implementing this 2022-10-13 18:35:25 +02:00
Tristan B. Velloza Kildaire 15d2bf6b68 Dependency generation
Full path evaluation update

If the local segment is a Class-type-of Container then run
a class static allocation on it and make the current dnode
dependent on that ClassStaticAllocation dnode returned from
classStaticAllocate().
2022-10-13 18:32:33 +02:00
Tristan B. Velloza Kildaire 2d58d5f0d7 WIP: Full path dependency evaluation 2022-10-13 18:29:30 +02:00
Tristan B. Velloza Kildaire 8a82751a18 Added Gitea issue number #8 for ClassStaticAllocate node 2022-10-13 14:34:47 +02:00
Tristan B. Velloza Kildaire 4b36623861 Added Gitea issue note 2022-10-13 13:45:39 +02:00
Tristan B. Velloza Kildaire 96d8f0face WIP: Found a fix for context lookup failure 2022-10-13 13:21:35 +02:00
Tristan B. Velloza Kildaire e2e356da73 Added FIXME note 2022-10-01 21:02:51 +02:00
Tristan B. Velloza Kildaire 81f168e154 Removed unused commented-out code 2022-10-01 20:58:34 +02:00
Tristan B. Velloza Kildaire 69572ff02c Removed unused method (older method before generalPass()) 2022-10-01 20:56:42 +02:00
Tristan B. Velloza Kildaire a8630b5939 We need to do funciton definition dependency generation ALOGN with normal dependency generation
- Disabled seperate generate() calls to FuncDefs in core.d for typechecking
- Added `saveFunctionDefinitionNode()` and `retrieveFunctionDefinitionNode()` to core.d for dependency
- Added a generalPass() call (and fixed it to skip on things != STATIC for InitScope - temporary fix)
- Added test case to test with
2022-10-01 20:55:08 +02:00
Tristan B. Velloza Kildaire 60a6f078a3 - Made Function a kind-of Container
- Ensure we set the parentOf all Statement's inside a Function (definition) whilst parsing - to prevent a runtime assertion (I believe, well all fixed now)
2022-10-01 20:54:50 +02:00
Tristan B. Velloza Kildaire 77708b65be WIP: Linerization (typechecking and code generation) for defined functions 2022-10-01 16:35:23 +02:00
Tristan B. Velloza Kildaire e810f762bc Added while loop test case 2022-10-01 16:09:26 +02:00
Tristan B. Velloza Kildaire 5444bd55e8 Added support for comparators to parser 2022-10-01 16:08:21 +02:00
Tristan B. Velloza Kildaire 200149efdf Cleaned up core.d unittest 2022-10-01 15:39:26 +02:00
Tristan B. Velloza Kildaire c1efb0c819 Added unit test to test floating point empty string test in lexer 2022-10-01 15:26:13 +02:00
Tristan B. Velloza Kildaire 8aa9441b06 Removed testing commit 2022-09-30 00:27:28 +02:00
Tristan B. Velloza Kildaire 64b19b5ddc Test commit 2022-09-30 00:27:19 +02:00
Tristan B. Velloza Kildaire 3fccf2fa5a Removed debug print 2022-09-29 22:44:48 +02:00
Tristan B. Velloza Kildaire 806814f01c Fixed bug whereby `isNumericalStr()` returned true for empty strings.
This fixes problems whereby if the current build up was empty and a field accessor was being attempted then lexing would fail.
2022-09-27 09:29:01 +02:00
Tristan B. Velloza Kildaire 3d54c4deee Removed assertions which are guaranteed to pass now (since the last fix of 449e878796) 2022-09-18 21:54:31 +02:00
Tristan B. Velloza Kildaire 449e878796 Fixed bug when processing the body of a class and a DNode was hit which was not one of the allowed types:
1. VariableDeclaration

Previously we added back the `varDecInstr` which is post-cast and if the cast failed (hence hitting this !varDecInstr branch) we didn't add back `instr` but rather added back `varDecInstr` which is 0 instead of being non-zero.

This later is incorrect.
2022-09-18 21:52:11 +02:00
Tristan B. Velloza Kildaire aae5dbabe8 Fixed compilation issue with jcli
Upgraded jcli
2022-08-23 16:33:49 +02:00
Tristan B. Velloza Kildaire a8f93e5817 Cleaned up comments for number literal code gen and type checking handling 2022-08-19 11:42:19 +02:00
Tristan B. Velloza Kildaire 7e49cf1d0a Added float support
- Added float constant support to the lexer
- Added float support to the typechecker to build the correct Instruction type

Unit tests

- Added unit test for a bad example of a malformed encoded floating point to test out the lexer
2022-08-11 10:26:30 +02:00
Tristan B. Velloza Kildaire 2dbe14b490 WIP: Floating pooint literal/constant support 2022-07-26 11:16:51 +02:00
Tristan B. Velloza Kildaire f49b0ce2b9 Added floating point constants to test 2022-07-26 10:34:53 +02:00
Tristan B. Velloza Kildaire c561060470 Added float and double types to builtin types
Added floating point test case
2022-07-26 10:27:55 +02:00
Tristan B. Velloza Kildaire e8ddb62152 Removed Double type
Refactored Float type
2022-07-26 10:27:12 +02:00
Tristan B. Velloza Kildaire f64c067184 Updated simple_string.t test 2022-07-26 10:12:35 +02:00
Tristan B. Velloza Kildaire 4488678d3e Code cleanup 2022-07-26 10:10:43 +02:00
Tristan B. Velloza Kildaire 18411c48c4 Removed TODO 2022-07-26 10:07:03 +02:00
Tristan B. Velloza Kildaire c8347fefba Updated simple_string.t to include string constants (literals) that test interning to the same pool ID 2022-07-26 09:59:59 +02:00
Tristan B. Velloza Kildaire d19512668a Pass StringLiteral instruction extracted string literal from StringExpression synmbol
Removed TODO
2022-07-26 09:59:27 +02:00
Tristan B. Velloza Kildaire e2157f428c Implemented `getStringLiteral()` for StringExpression symbol type 2022-07-26 09:58:45 +02:00
Tristan B. Velloza Kildaire 7e9e303a1c Implemented StringLiteral Value-kind-of instruction with string interning 2022-07-26 09:58:25 +02:00
Tristan B. Velloza Kildaire f9a8590604 Array type handling added to builtin-types handling 2022-07-26 09:57:57 +02:00
Tristan B. Velloza Kildaire e0feaac953 Added new test case 2022-07-25 19:34:57 +02:00
Tristan B. Velloza Kildaire 6cfca2cea2 Added `addInstr()` for StringExpression handling (String literals)
Bug fixed whenever a "" is encountered
2022-07-25 19:30:40 +02:00
Tristan B. Velloza Kildaire 415538f54a Added StringLiteral instruction 2022-07-25 19:30:07 +02:00
Tristan B. Velloza Kildaire ca2fa84057 Added support for Pointer type resolution via `getType()`. Now `char**` -> Pointer("char*"), which before construction of such a Pointer is recursively resolved, so nested Pointer(Pointer(...)) 2022-07-25 19:15:27 +02:00
Tristan B. Velloza Kildaire 88a48e1b3d FuncDecNode for the Dependecny Tree Generator added 2022-04-13 09:51:38 +02:00
Tristan B. Velloza Kildaire 35d71a0c25 WIP: FunctionHandle (reference to a funciton's name (NOT a FuncCall)) support (context may not be entirely right) 2022-04-13 09:51:23 +02:00
Tristan B. Velloza Kildaire f571115c23 Added some possible todos, might not need to do any of them but I also might 2022-04-13 09:50:24 +02:00
Tristan B. Velloza Kildaire 1322c0f790 BinaryOperatorExpression now has a proper toString() 2022-04-13 09:49:42 +02:00