OLD | NEW |
---|---|
(Empty) | |
1 | |
2 function test() { | |
3 // for loops | |
4 for (var i = #0; i #< 128; ++#i) { | |
5 } | |
6 for (var a #of #array) { | |
7 } | |
8 for (var a #of #[1,2,3]) { | |
9 } | |
10 for (var i = #boo1(); i #!= #boo2(); i #+= #boo3()) { | |
11 } | |
12 // switch | |
13 #switch(val) { | |
14 case 1: #break; | |
15 case 2: #return; | |
16 } | |
17 #switch(#boo1()) { | |
18 default: #break; | |
19 } | |
20 // nested functions | |
21 function nested1() {#} | |
22 function nested2() { #return 42; #} | |
23 // arrow function + assignment | |
24 var a = #() => #42#; | |
25 // var | |
26 var b1 = #2; | |
27 var b2 = 1 #+ 2; | |
28 var b3 = ++#b2; | |
29 var b4 = #boo4() #+ #boo5(); | |
30 // let | |
31 let a1 = #1; | |
32 let a2 = a1 #+ 2; | |
33 let a3 = #boo3() #+ #boo4(); | |
34 // const | |
35 const c1 = #1; | |
36 // while loops | |
37 while (i #< #boo5()) { | |
38 #boo6(); | |
39 #break; | |
40 } | |
41 // continue | |
42 while (#i) { | |
43 #++i; | |
44 #continue; | |
45 } | |
46 // debugger | |
47 #debugger; | |
48 // do | |
49 do { | |
50 #boo7(); | |
51 } while(#boo5() #+ #boo6()); | |
52 // try | |
53 try { | |
54 #throw #new Error(); | |
55 } catch (e) { | |
56 #boo2(); | |
57 } finally { | |
58 #boo1(); | |
59 } | |
60 // obj literal | |
61 var obj = #{ | |
62 prop: 2 | |
63 }; | |
64 // arrow functions | |
65 #Promise.#resolve().#then(() => #42#) | |
66 .#then(a => a#++#) | |
67 .#then(a => #a()#) | |
68 .#then(a => { #boo1(); #boo2(); #}); | |
69 // classes | |
70 #class Cat { | |
71 constructor(name) { | |
72 #this.name = name; | |
73 #} | |
74 | |
75 speak() { | |
76 #} | |
77 } | |
78 #class Lion extends Cat { | |
79 constructor(name) { | |
80 #super(name); | |
81 #} | |
82 | |
83 speak() { | |
84 #super.#speak(); | |
85 #} | |
86 } | |
87 // other expressions | |
88 #obj.a.#b().c = obj.#a().b.#c(); | |
89 1 + 2; | |
dgozman
2017/02/23 02:03:28
We don't have a location here? Interesting. Let's
kozy
2017/02/27 17:37:57
Looks like issue, stepping will break before 1 + 2
| |
90 #({}).a = 42; | |
91 #++a; | |
92 #boo() + #foo(); | |
93 // async await | |
94 async function async1() { | |
95 #await Promise.resolve().then(() => #42#); | |
dgozman
2017/02/23 02:03:28
No locations before resolve and then?
kozy
2017/02/27 17:37:57
looks like issue too.
| |
96 #await #async2(); | |
97 #} | |
98 async function async2() { | |
99 #return 42; | |
100 #} | |
101 #} | |
102 //# sourceURL=test.js | |
OLD | NEW |