From 0b9d2e142c85ce74c3a42ac23ef0d3fbf21217b4 Mon Sep 17 00:00:00 2001 From: Timothy Clem Date: Fri, 13 Apr 2018 14:12:04 -0700 Subject: [PATCH] In JavaScript, continue and break can also have trailing comments - assign them --- src/Language/TypeScript/Assignment.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Language/TypeScript/Assignment.hs b/src/Language/TypeScript/Assignment.hs index dabdb1533..037837656 100644 --- a/src/Language/TypeScript/Assignment.hs +++ b/src/Language/TypeScript/Assignment.hs @@ -613,10 +613,10 @@ doStatement :: Assignment doStatement = makeTerm <$> symbol DoStatement <*> children (flip Statement.DoWhile <$> term statement <*> term parenthesizedExpression) continueStatement :: Assignment -continueStatement = makeTerm <$> symbol ContinueStatement <*> children (Statement.Continue <$> (statementIdentifier <|> emptyTerm)) +continueStatement = makeTerm <$> symbol ContinueStatement <*> children (Statement.Continue <$> (statementIdentifier <|> term emptyTerm)) breakStatement :: Assignment -breakStatement = makeTerm <$> symbol BreakStatement <*> children (Statement.Break <$> (statementIdentifier <|> emptyTerm)) +breakStatement = makeTerm <$> symbol BreakStatement <*> children (Statement.Break <$> (statementIdentifier <|> term emptyTerm)) withStatement :: Assignment withStatement = makeTerm <$> symbol WithStatement <*> children (TypeScript.Syntax.With <$> term parenthesizedExpression <*> term statement)