mirror of https://github.com/tbklang/tlang.git
Implement expression-less return statements #70
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: 11 minutes 58 seconds
Due Date
deavmi
11 minutes 58 seconds
Dependencies
No dependencies set.
Reference: tlang/tlang#70
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 it?
Implement the ability to just do
return
with no expression (in the context of avoid
) method.What would we need?
hasExpression()
method inReturnStmt
hasExpression()
such that we know whether or not to pop from thecodeQueue
ReturnInstr
must have ahasExpressionInstr()
such that we can yank it out and calltransform(Instruction)
on it as part of thetransform(ReturnInstr)
of"return "~transform(ReturnExprInstr)~";"
DGen
to respect newReturnInstruction
APII should take a look at this as well.
This was finished a while back
Actually this is not done because emit fails:
vardec_varass_dependencyto bugfix/dgen_expressionless_returnsDGen
ReturnInstruction
with no expressionTest cases
simple_return_expressionless.t
Just need to add test
Pipelines
simple_return_expressionless.t
as an emit testWaiting for tests to complete...
All checks pass, ready for merging ✅