@Test public void array_binding_pattern() throws Exception { ControlFlowGraph g = build("var [element1, element2] = arr", 1); assertBlock(g, 0).hasElements("arr", "element1", "element2", "[element1, element2]", "[element1, element2] = arr", "var [element1, element2] = arr"); g = build("var [element1=1] = arr", 1); assertBlock(g, 0).hasElements("arr", "1", "element1", "element1=1", "[element1=1]", "[element1=1] = arr", "var [element1=1] = arr"); g = build("var [, element2, ...rest] = arr", 1); assertBlock(g, 0).hasElements("arr", "element2", "rest", "...rest", "[, element2, ...rest]", "[, element2, ...rest] = arr", "var [, element2, ...rest] = arr"); }
public static ControlFlowGraph build(ScriptTree tree) { return new ControlFlowGraphBuilder().createGraph(tree); }
ControlFlowGraph { public static ControlFlowGraph build(ScriptTree tree) { return new ControlFlowGraphBuilder().createGraph(tree); } }
ControlFlowGraph { public static ControlFlowGraph build(ScriptTree tree) { return new ControlFlowGraphBuilder().createGraph(tree); } ControlFlowGraph(Set<JsCfgBlock> blocks, CfgBlock start, JsCfgEndBlock end); }
ControlFlowGraph { public static ControlFlowGraph build(ScriptTree tree) { return new ControlFlowGraphBuilder().createGraph(tree); } ControlFlowGraph(Set<JsCfgBlock> blocks, CfgBlock start, JsCfgEndBlock end); static ControlFlowGraph build(ScriptTree tree); static ControlFlowGraph build(BlockTree body); CfgBlock start(); CfgBlock end(); Set<CfgBlock> blocks(); Set<CfgBlock> unreachableBlocks(); Set<SyntaxToken> disconnectingJumps(CfgBlock block); }
ControlFlowGraph { public static ControlFlowGraph build(ScriptTree tree) { return new ControlFlowGraphBuilder().createGraph(tree); } ControlFlowGraph(Set<JsCfgBlock> blocks, CfgBlock start, JsCfgEndBlock end); static ControlFlowGraph build(ScriptTree tree); static ControlFlowGraph build(BlockTree body); CfgBlock start(); CfgBlock end(); Set<CfgBlock> blocks(); Set<CfgBlock> unreachableBlocks(); Set<SyntaxToken> disconnectingJumps(CfgBlock block);  }