Skip to content

Support labeled statements #2889

@wrnrlr

Description

@wrnrlr

Feature suggestion

Labeled statements can come in handy when implementing complex control flow with multiple nested loops and if statements.

Currently parser will complain

function test1():void { let str = ''; loop1: for (let i = 0; i < 5; i++) { if (i === 1) { continue loop1; } str = str + i; } } 
ERROR TS1109: Expression expected. : 11 │ loop1: for (let i = 0; i < 5; i++) { │ ~ └─ in assembly/index.ts(11,8) 

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions