mirror of https://github.com/tbklang/tlang.git
🧠 Feature: Direct function calls #120
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: 18 minutes 43 seconds
Due Date
deavmi
18 minutes 43 seconds
Dependencies
No dependencies set.
Reference: tlang/tlang#120
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 is this?
We want to add support to do:
Without having to do:
It is an expression and would need to be seen as such, I recommend we use some technique to detect a function call but then re-wind as effectively we just will have an expression - ensure this works out fine with code queue ordering - it may not so we may need to contain 🤔
We know that
FuncCall
is an expression and because of that, during theDNode
processing post-linearization, it will be picked up in the section where we hoist out all thegetEntity()
and it is a kind-ofExpression
.Direct function callsto 🧠 Feature: Direct function callsI want to get this done this week - very soon.
I have a working implementation for this (and therefore solution). We simply have had to do the following:
parseName()
never returned the actualFunctionCall
in such a caseFunctionCall
in thegeneralPass()
in the dependency generatorFunctionCall
AST node (parser node) must have a boolean to mark whether it is statement-level or notFuncCallInstr
must be marked as statement-level if its corresponding AST nodeFunctionCall
was marked as suchDGen
code emitter now checks theFuncCallInstr
to see if it is marked, if so then an additional";"
is appended to the generatedemit
stringThis is all available now in commit
0da9af085df1c378a09d1f592c2458929e6679af
.Checklist
Going to write the test today.
Done
As of commit
a54df0f38deb377c62fded722cda1d921f3a0d41
this is implemented, unit tests and CI passes ✅Just waiting for merge now.
Merging... awaiting CI/CD status
All good ✅