oxc/crates/oxc_semantic/tests/integration/snapshots/labeled_block_break.snap
Dunqing 7f1adddaf0 refactor(semantic): correct scope in CatchClause (#4192)
close: #4186

CatchClause has two scopes. The first one is `CatchClause`, which will add a `CatchParameter` to it. The second one is `Block`, which will add binding that declares in the current block scope.

The spec has a syntax error about `CatchParameter`
- It is a Syntax Error if any element of the BoundNames of CatchParameter also occurs in the LexicallyDeclaredNames of Block.
2024-07-11 08:45:30 +00:00

86 lines
1.6 KiB
Text

---
source: crates/oxc_semantic/tests/integration/cfg.rs
expression: snapshot
input_file: crates/oxc_semantic/tests/integration/cfg_fixtures/labeled_block_break.js
---
bb0: {
}
bb1: {
statement
}
bb2: {
}
bb3: {
statement
}
bb4: {
statement
statement
statement
statement
}
bb5: {
condition
}
bb6: {
statement
break <label>
}
bb7: {
unreachable
}
bb8: {
}
bb9: {
}
bb10: {
}
digraph {
0 [ label = "" ]
1 [ label = "TryStatement" ]
2 [ label = "" ]
3 [ label = "BlockStatement" ]
4 [ label = "BlockStatement\nLabeledStatement\nBlockStatement\nIfStatement" ]
5 [ label = "Condition(IdentifierReference(condition))" ]
6 [ label = "BlockStatement\nbreak <LABEL>" ]
7 [ label = "unreachable" ]
8 [ label = "" ]
9 [ label = "" ]
10 [ label = "" ]
1 -> 0 [ label = "Error(Implicit)" ]
3 -> 2 [ label = "Error(Explicit)" ]
4 -> 0 [ label = "Error(Implicit)" ]
2 -> 4 [ label = "Normal" ]
5 -> 0 [ label = "Error(Implicit)" ]
6 -> 0 [ label = "Error(Implicit)" ]
7 -> 0 [ label = "Error(Implicit)" , style = "dotted" ]
6 -> 7 [ label = "Unreachable" , style = "dotted" ]
8 -> 0 [ label = "Error(Implicit)" ]
4 -> 5 [ label = "Normal" ]
7 -> 8 [ label = "Normal" , style = "dotted" ]
5 -> 6 [ label = "Jump" ]
4 -> 8 [ label = "Normal" ]
9 -> 0 [ label = "Error(Implicit)" ]
8 -> 9 [ label = "Normal" ]
6 -> 9 [ label = "Jump" ]
10 -> 0 [ label = "Error(Implicit)" ]
1 -> 3 [ label = "Normal" ]
3 -> 10 [ label = "Normal" ]
9 -> 10 [ label = "Normal" ]
}