-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Declare and update return.value #366
Conversation
source/parser.hera
Outdated
AfterReturnShorthand | ||
WAssignmentOp | ||
UpdateExpressionSymbol | ||
__ Colon |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could pick up a Label
on the following line, we may want to disallow __
and enforce same line or use a more specific rule.
We may also be able to use the return type annotation of a function, if present, to set the default type annotation for the return value. |
Start to flesh out type AST
Great idea! I implemented this, which involved improving the AST for types a bit. Not sure I got the best names for things ( |
Fixes labels in a few cases
4469fab prevents newlines before colons in a lot of cases. (I searched for all |
Sequel to #364. I started writing documentation and then added a few intended features:
let return: T
return .= init
return++
Also cleans up the code in a single
ReturnValue
rule.