1
1
mirror of https://github.com/github/semantic.git synced 2025-01-03 13:02:37 +03:00

Let return statements fall through.

This commit is contained in:
Rob Rix 2017-01-23 15:08:40 -05:00
parent f2dd0977ba
commit f761323f14

View File

@ -16,7 +16,6 @@ termAssignment
-> [ SyntaxTerm Text '[Range, Category, SourceSpan] ] -- ^ The child nodes of the term.
-> Maybe (SyntaxTerm Text '[Range, Category, SourceSpan]) -- ^ The resulting term, in IO.
termAssignment source (range :. category :. sourceSpan :. Nil) children = case (category, children) of
(Return, _) -> withDefaultInfo $ S.Return children
(Import, [importName]) -> withDefaultInfo $ S.Import importName []
(Function, [id, params, block]) -> withDefaultInfo $ S.Function id (toList $ unwrap params) (toList $ unwrap block)
(For, [body]) | Other "block" <- Info.category (extract body) -> withDefaultInfo $ S.For [] (toList (unwrap body))