From c065344f3bf71f27c719e12537e57b8c1647da89 Mon Sep 17 00:00:00 2001 From: Timothy Clem Date: Fri, 13 Apr 2018 10:49:48 -0700 Subject: [PATCH] JavaScript returns can have comments even with no return expression --- src/Language/TypeScript/Assignment.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Language/TypeScript/Assignment.hs b/src/Language/TypeScript/Assignment.hs index 51505768a..dabdb1533 100644 --- a/src/Language/TypeScript/Assignment.hs +++ b/src/Language/TypeScript/Assignment.hs @@ -622,7 +622,7 @@ withStatement :: Assignment withStatement = makeTerm <$> symbol WithStatement <*> children (TypeScript.Syntax.With <$> term parenthesizedExpression <*> term statement) returnStatement :: Assignment -returnStatement = makeTerm <$> symbol ReturnStatement <*> children (Statement.Return <$> (term expressions <|> emptyTerm)) +returnStatement = makeTerm <$> symbol ReturnStatement <*> children (Statement.Return <$> (term expressions <|> term emptyTerm)) throwStatement :: Assignment throwStatement = makeTerm <$> symbol Grammar.ThrowStatement <*> children (Statement.Throw <$> term expressions)