mirror of https://github.com/tbklang/tlang.git
Handling of this (post-iteration statement) #76
Labels
No Label
dependency
emit
hashmapper
lebanonmapper
lexer
meta
needsfix
parser
qol
question
resolution
typing
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
Blocks
#75 Implement `parseStatement()`
tlang/tlang
Reference: tlang/tlang#76
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?
WHen we have:
So we call
parseStatement()
on this, thenparseExpression()
is called in-turn. It will stop when it sees a)
or;
and then return the expression toparseStatement()
- howeverparseStatement()
will expect to have;
and not a)
. We could work around this by passing in the requested terminator toparseStatement()
and having the default argument value beSymbolType.SEMICOLON
.I think that is a neat fix.
Actually, it isn't there me thinks? mmmh:
Aha! It's in
parseAssignment()
.As:
parseStatement() -> parseName() -> parseAssignment()
.We would probably need to parse this thing all the way down.
I have implemented the above and it seems to be working.
We have sorted this out with an update to:
parseStatement()
parseName()
parseAssignment()
They now all take in arguments for a custoim terminator but will default to
SymbolType.SEMICOLON
.As of commit
ec7d8cf4240b24a2f6fdbd8071195c9efe08d573
on branchloops