File tree Expand file tree Collapse file tree 7 files changed +995
-293
lines changed Expand file tree Collapse file tree 7 files changed +995
-293
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ class JSCompiler extends Base {
16
16
var errcurlvls = [ ] ;
17
17
18
18
function getval ( x ) {
19
- if ( x == undefined ) {
19
+ if ( x === undefined ) {
20
20
return "" ;
21
21
}
22
22
if ( x [ 0 ] == "ans" ) {
@@ -31,16 +31,16 @@ class JSCompiler extends Base {
31
31
var a = this . asc [ i ] ;
32
32
if ( a . op == "var" ) {
33
33
for ( var j = 0 ; j < a . count ; j ++ ) {
34
- if ( a . values [ j ] == undefined ) {
34
+ if ( a . values [ j ] === undefined ) {
35
35
a . values [ j ] = [ ] ;
36
36
}
37
37
var name = a . names [ j ] ;
38
38
var value = a . values [ j ] [ 1 ] ;
39
- if ( name == undefined ) {
39
+ if ( name === undefined ) {
40
40
name = this . nextTmpVar ( ) ;
41
41
strayvar . push ( name ) ;
42
42
}
43
- if ( value == undefined ) {
43
+ if ( value === undefined ) {
44
44
if ( a . type == "arr" ) {
45
45
value = "[]" ;
46
46
} else if ( a . type == "num" ) {
@@ -265,7 +265,7 @@ class JSCompiler extends Base {
265
265
strayvar = [ ] ;
266
266
} else if ( a . op == "catcherr" ) {
267
267
var ec = errcurlvls [ errcurlvls . length - 1 ] ;
268
- if ( a . error == undefined ) {
268
+ if ( a . error === undefined ) {
269
269
var vname = this . nextTmpVar ( ) ;
270
270
strayvar . push ( vname ) ;
271
271
if ( curlvl != ec [ 0 ] ) {
Original file line number Diff line number Diff line change @@ -17,15 +17,15 @@ class PYCompiler extends Base {
17
17
var strayvar = [ ] ;
18
18
var took = 0 ;
19
19
const getval = x => {
20
- if ( x == undefined ) {
20
+ if ( x === undefined ) {
21
21
return "" ;
22
22
}
23
23
if ( x [ 0 ] == "ans" ) {
24
24
var ans = strayvar [ strayvar . length - 1 ] ;
25
25
strayvar = [ ] ;
26
26
return ans ;
27
27
}
28
- if ( x [ 1 ] == undefined ) {
28
+ if ( x [ 1 ] === undefined ) {
29
29
return undefined ;
30
30
}
31
31
if ( x [ 1 ] . toString ( ) == "true" ) {
@@ -41,16 +41,16 @@ class PYCompiler extends Base {
41
41
var a = this . asc [ i ] ;
42
42
if ( a . op == "var" ) {
43
43
for ( var j = 0 ; j < a . count ; j ++ ) {
44
- if ( a . values [ j ] == undefined ) {
44
+ if ( a . values [ j ] === undefined ) {
45
45
a . values [ j ] = [ ] ;
46
46
}
47
47
var name = a . names [ j ] ;
48
48
var value = getval ( a . values [ j ] ) ;
49
- if ( name == undefined ) {
49
+ if ( name === undefined ) {
50
50
name = this . nextTmpVar ( ) ;
51
51
strayvar . push ( name ) ;
52
52
}
53
- if ( value == undefined ) {
53
+ if ( value === undefined ) {
54
54
if ( a . type == "arr" ) {
55
55
value = "Ctnr()" ;
56
56
} else if ( a . type == "num" ) {
Original file line number Diff line number Diff line change @@ -99,14 +99,14 @@ class RBCompiler extends Base {
99
99
return ans ;
100
100
}
101
101
if ( x [ 0 ] == "iden" ) return this . rename ( x [ 1 ] ) ;
102
- if ( x [ 1 ] == undefined ) return "nil" ;
102
+ if ( x [ 1 ] === undefined ) return "nil" ;
103
103
return x [ 1 ] ;
104
104
} ;
105
105
for ( let i = 0 ; i < asc . length ; i ++ ) {
106
106
let a = asc [ i ] ;
107
107
if ( a . op == "var" ) {
108
108
for ( let j = 0 ; j < a . count ; j ++ ) {
109
- if ( a . values [ j ] == undefined ) {
109
+ if ( a . values [ j ] === undefined ) {
110
110
a . values [ j ] = [ ] ;
111
111
}
112
112
let name = a . names [ j ] ;
@@ -115,7 +115,7 @@ class RBCompiler extends Base {
115
115
continue ;
116
116
}
117
117
let value = getval ( a . values [ j ] ) ;
118
- if ( name == undefined ) {
118
+ if ( name === undefined ) {
119
119
name = this . nextTmpVar ( ) ;
120
120
strayvar . push ( name ) ;
121
121
}
You can’t perform that action at this time.
0 commit comments