Support else-if statements #2
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?
putting this here so that i can start working on lexical analysis without forgetting to implement this later
else-if expressions (not statements) are already supported, as they can build
IfExpr
s immediately off of the trailingif
and not worry about whether it has anelse
or not, sinceIfExpr
ONLY builds withelse
clauseselse-if statements need to be able to automatically convert else-less if blocks into branch bodies without tail expressions, and else-ful if blocks into tail expressions, while still returning the tail token on failure
this is actually pretty simple but i'm tired of working on parser code and would really like to move onto semantics
for now i'm putting curly braces around else statements to make them work in the examples, i'll leave TODOs so that they can be reverted later