-
Notifications
You must be signed in to change notification settings - Fork 437
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support string, int and customization
- Loading branch information
Hongbo Zhang
committed
Jul 20, 2016
1 parent
dec66b2
commit 1e7f6cb
Showing
16 changed files
with
221 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,42 @@ | ||
'use strict'; | ||
|
||
|
||
function u() { | ||
return hey("on_open"); | ||
} | ||
|
||
function v() { | ||
return hey("on_closed"); | ||
function hey_string (option){ | ||
switch(option){ | ||
case "on_closed" : return 1 ; | ||
case "on_open" : return 2 ; | ||
case "in" : return 3; | ||
default : throw Error ("impossible") | ||
} | ||
} | ||
function hey_int (option){ | ||
switch (option){ | ||
case 0 : return 1; | ||
case 3 : return 3; | ||
case 4 : return 4; | ||
default : throw Error("impossible") | ||
} | ||
} | ||
|
||
function ff(h) { | ||
return hey(function () { | ||
switch (h) { | ||
case 119688204 : | ||
return "on_closed"; | ||
case -2798038 : | ||
return "on_open"; | ||
case 5246170 : | ||
return "in"; | ||
|
||
} | ||
}()); | ||
} | ||
; | ||
|
||
function xx() { | ||
return hey("in"); | ||
} | ||
var uu = /* int array */[ | ||
hey_string("on_open"), | ||
hey_string("on_closed"), | ||
hey_string("in") | ||
]; | ||
|
||
var vv = /* int array */[ | ||
hey_int(3), | ||
hey_int(0), | ||
hey_int(4) | ||
]; | ||
|
||
hey_string("on_closed"); | ||
|
||
var option = /* on_closed */119688204; | ||
hey_string("in"); | ||
|
||
exports.u = u; | ||
exports.option = option; | ||
exports.v = v; | ||
exports.ff = ff; | ||
exports.xx = xx; | ||
/* No side effect */ | ||
exports.uu = uu; | ||
exports.vv = vv; | ||
/* Not a pure module */ |
Oops, something went wrong.