mirror of https://github.com/tbklang/tlang.git
Conditional compilation, size_t, ssize_t, sizeof and so forth #119
Labels
No Label
dependency
emit
hashmapper
lebanonmapper
lexer
meta
needsfix
parser
qol
question
resolution
typing
No Milestone
No project
No Assignees
1 Participants
Notifications
Total Time Spent: 3 minutes 30 seconds
Due Date
deavmi
3 minutes 30 seconds
No due date set.
Dependencies
No dependencies set.
Reference: tlang/tlang#119
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What it this?
Add support for things such as conditional compilation, types dependent on the system and so forth.
It would make sense to support all of this within the
MetaProcessor
, therefore let's first get the ball rolling with #116.Types
We should support the following types:
size_t
ssize_t
sizeof(<identifier>)
We need to add support for
sizeof(<identifier>)
:Parser
MetaProcessor
Conditional compilation, size_t, ssize_t and so forthto Conditional compilation, size_t, ssize_t, sizeof and so forthWe went about the
sizeof()
differently and in a better manner than a kind-of literal. It is aFunctionCall
which means the parser never had to change and we could replace it easily with anIntegerLiteral
. Previous approach never replaced anything but updated a kind-ofIntegerLiteral
(dubbed sizeofLiteral) - this was a bad approach and is now fixed.It was "bad" because it treated as something it is not, replacement was what we were looking for and not something that acts like an
IntegerLiteral
.Well, this is completed ✅