File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -1350,17 +1350,17 @@ func (p *Parser) parseExpressionOrLabeledStatement() *ast.Statement {
1350
1350
hasJSDoc := p .hasPrecedingJSDocComment ()
1351
1351
hasParen := p .token == ast .KindOpenParenToken
1352
1352
expression := p .parseExpression ()
1353
+
1353
1354
if expression .Kind == ast .KindIdentifier && p .parseOptional (ast .KindColonToken ) {
1354
1355
result := p .factory .NewLabeledStatement (expression , p .parseStatement ())
1355
1356
p .finishNode (result , pos )
1356
1357
p .withJSDoc (result , hasJSDoc )
1357
1358
return result
1358
1359
}
1359
- // !!!
1360
- // if !p.tryParseSemicolon() {
1361
- // p.parseErrorForMissingSemicolonAfter(expression)
1362
- // }
1363
- p .parseSemicolon ()
1360
+
1361
+ if ! p .tryParseSemicolon () {
1362
+ p .parseErrorForMissingSemicolonAfter (expression )
1363
+ }
1364
1364
result := p .factory .NewExpressionStatement (expression )
1365
1365
p .finishNode (result , pos )
1366
1366
p .withJSDoc (result , hasJSDoc && ! hasParen )
You can’t perform that action at this time.
0 commit comments