]> git.proxmox.com Git - pve-eslint.git/blob - eslint/tests/fixtures/code-path-analysis/function--in-condition-expr.js
first commit
[pve-eslint.git] / eslint / tests / fixtures / code-path-analysis / function--in-condition-expr.js
1 /*expected
2 initial->s2_1->final;
3 */
4 /*expected
5 initial->s3_1->final;
6 */
7 /*expected
8 initial->s1_1->s1_2->s1_4;
9 s1_1->s1_3->s1_4->final;
10 */
11 (
12 foo ? function foo() {}
13 : function bar() {}
14 )();
15
16 /*DOT
17 digraph {
18 node[shape=box,style="rounded,filled",fillcolor=white];
19 initial[label="",shape=circle,style=filled,fillcolor=black,width=0.25,height=0.25];
20 final[label="",shape=doublecircle,style=filled,fillcolor=black,width=0.25,height=0.25];
21 s2_1[label="FunctionExpression\nIdentifier (foo)\nBlockStatement"];
22 initial->s2_1->final;
23 }
24 digraph {
25 node[shape=box,style="rounded,filled",fillcolor=white];
26 initial[label="",shape=circle,style=filled,fillcolor=black,width=0.25,height=0.25];
27 final[label="",shape=doublecircle,style=filled,fillcolor=black,width=0.25,height=0.25];
28 s3_1[label="FunctionExpression\nIdentifier (bar)\nBlockStatement"];
29 initial->s3_1->final;
30 }
31 digraph {
32 node[shape=box,style="rounded,filled",fillcolor=white];
33 initial[label="",shape=circle,style=filled,fillcolor=black,width=0.25,height=0.25];
34 final[label="",shape=doublecircle,style=filled,fillcolor=black,width=0.25,height=0.25];
35 s1_1[label="Program\nExpressionStatement\nCallExpression\nConditionalExpression\nIdentifier (foo)"];
36 s1_2[label="FunctionExpression"];
37 s1_4[label="ConditionalExpression:exit\nCallExpression:exit\nExpressionStatement:exit\nProgram:exit"];
38 s1_3[label="FunctionExpression"];
39 initial->s1_1->s1_2->s1_4;
40 s1_1->s1_3->s1_4->final;
41 }
42 */