-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershacktoberfestA good issue to work on for HacktoberfestA good issue to work on for Hacktoberfesthelp wantedExtra attention is neededExtra attention is needed
Description
Currently if you try to write a conditional such as:
if (someCondition) return 'hello'
the compiler will throw a ParseError because it expects to find a block or an expression after the condition, but return is currently not being treated as an "expression". Let's change the parsing for conditional nodes, to allow for returns.
- Update the parser to make returns work as the expression (for
if,else if, andelse) - Write a test to validate that the
returnkeyword works in a single-line conditional with no curly braces
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershacktoberfestA good issue to work on for HacktoberfestA good issue to work on for Hacktoberfesthelp wantedExtra attention is neededExtra attention is needed