Update parser to allow for inline conditional returns #12
Labels
enhancement
New feature or request
good first issue
Good for newcomers
hacktoberfest
A good issue to work on for Hacktoberfest
help wanted
Extra attention is needed
Currently if you try to write a conditional such as:
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.if
,else if
, andelse
)return
keyword works in a single-line conditional with no curly bracesThe text was updated successfully, but these errors were encountered: