label: for (...) { ... }
Javascript bizarrely allows labels on any statements, but the labels are only useful when applied to loops or switches.
The empty string is the default label, so break; breaks with label "".
break;
""
838485868788899091929394
private StatementSimplifier(MessageQueue mq) { this.mq = mq; } private ParseTreeNode optimize(ParseTreeNode n, boolean needsBlock) { if (n instanceof LabeledStatement) { LabeledStatement ls = (LabeledStatement) n; String label = ls.getLabel(); if (!(label == null || "".equals(label))) { StmtLabel oldSl = labels.get(label); String oldBlankLabel = blankLabel; StmtLabel sl = new StmtLabel(labelGenerator.next()); labels.put(label, sl);