diff options
| author | Li Jin <dragon-fly@qq.com> | 2023-08-17 10:36:15 +0800 |
|---|---|---|
| committer | Li Jin <dragon-fly@qq.com> | 2023-08-17 10:36:15 +0800 |
| commit | e61cce21ef7def2c2e52dd6cb6a5b540ebcac29d (patch) | |
| tree | 6e7c5e7e6f13157e9f8db26c38f6d8cba75683e5 /spec/outputs/unicode/funcs.lua | |
| parent | 289faf45ac26f7e0ac1a1e4305e5c42fc1e5b866 (diff) | |
| download | yuescript-e61cce21ef7def2c2e52dd6cb6a5b540ebcac29d.tar.gz yuescript-e61cce21ef7def2c2e52dd6cb6a5b540ebcac29d.tar.bz2 yuescript-e61cce21ef7def2c2e52dd6cb6a5b540ebcac29d.zip | |
add unicode identifier support, fix more issue from #144
Diffstat (limited to 'spec/outputs/unicode/funcs.lua')
| -rw-r--r-- | spec/outputs/unicode/funcs.lua | 222 |
1 files changed, 222 insertions, 0 deletions
diff --git a/spec/outputs/unicode/funcs.lua b/spec/outputs/unicode/funcs.lua new file mode 100644 index 0000000..6e94587 --- /dev/null +++ b/spec/outputs/unicode/funcs.lua | |||
| @@ -0,0 +1,222 @@ | |||
| 1 | local _u53d8_u91cfx | ||
| 2 | _u53d8_u91cfx = function() | ||
| 3 | return _u6253_u5370(_u4ec0_u4e48) | ||
| 4 | end | ||
| 5 | local __u65e0_u6548_u53d8_u91cf | ||
| 6 | __u65e0_u6548_u53d8_u91cf = function() end | ||
| 7 | __u65e0_u6548_u53d8_u91cf = function() | ||
| 8 | return function() | ||
| 9 | return function() end | ||
| 10 | end | ||
| 11 | end | ||
| 12 | _u5230(_u8c37(_u4ed3(_u53bb))) | ||
| 13 | _u5f00(function() | ||
| 14 | return _u8fd9_u6247(function() | ||
| 15 | return _u95e8 | ||
| 16 | end) | ||
| 17 | end) | ||
| 18 | _u5f00(function() | ||
| 19 | _u8fd9_u6247(_u95e8) | ||
| 20 | local _u4f60_u597d | ||
| 21 | _u4f60_u597d = function() | ||
| 22 | return _u6211_u7684(_u51fd_u6570) | ||
| 23 | end | ||
| 24 | end) | ||
| 25 | local _u53d8_u91cfh | ||
| 26 | _u53d8_u91cfh = function() | ||
| 27 | return _ud83d_udc4b | ||
| 28 | end | ||
| 29 | _u5403(function() end, _u4e16_u754c); | ||
| 30 | (function() end)() | ||
| 31 | _u53d8_u91cfx = function(...) end | ||
| 32 | _u4f60_u597d() | ||
| 33 | _u4f60_u597d["世界"]() | ||
| 34 | __u65e0_u6548_u53d8_u91cf = _u4f60_u597d()["某物"] | ||
| 35 | __u65e0_u6548_u53d8_u91cf = _u4ec0_u4e48()["🥵🥵🥵"] | ||
| 36 | _u4ec0()(_u4e48()(_u60c5_u51b5())) | ||
| 37 | __u65e0_u6548_u53d8_u91cf = function(_u53c2_u6570a, _u53c2_u6570b, _u53c2_u6570c, _u53c2_u6570d, _u53c2_u6570e) end | ||
| 38 | __u65e0_u6548_u53d8_u91cf = function(_u53c2_u6570, _u53c2_u6570, _u53c2_u6570, _u53c2_u6570, _u53c2_u6570) | ||
| 39 | return _u6253_u5370(_u53c2_u6570) | ||
| 40 | end | ||
| 41 | __u65e0_u6548_u53d8_u91cf = function(_u53c2_u6570x) | ||
| 42 | if _u53c2_u6570x == nil then | ||
| 43 | _u53c2_u6570x = 23023 | ||
| 44 | end | ||
| 45 | end | ||
| 46 | __u65e0_u6548_u53d8_u91cf = function(_u53c2_u6570x) | ||
| 47 | if _u53c2_u6570x == nil then | ||
| 48 | _u53c2_u6570x = function(_u53c2_u6570y) | ||
| 49 | if _u53c2_u6570y == nil then | ||
| 50 | _u53c2_u6570y = function() end | ||
| 51 | end | ||
| 52 | end | ||
| 53 | end | ||
| 54 | end | ||
| 55 | __u65e0_u6548_u53d8_u91cf = function(_u53d8_u91cfx) | ||
| 56 | if _u53d8_u91cfx == nil then | ||
| 57 | if _u67d0_u7269 then | ||
| 58 | _u53d8_u91cfx = _u597d | ||
| 59 | else | ||
| 60 | _u53d8_u91cfx = _u574f | ||
| 61 | end | ||
| 62 | end | ||
| 63 | end | ||
| 64 | local _u67d0_u7269 | ||
| 65 | _u67d0_u7269 = function(_u4f60_u597d, _u4e16_u754c) | ||
| 66 | if _u4f60_u597d == nil then | ||
| 67 | _u4f60_u597d = 100 | ||
| 68 | end | ||
| 69 | if _u4e16_u754c == nil then | ||
| 70 | _u4e16_u754c = function(_u53c2_u6570x) | ||
| 71 | if _u53c2_u6570x == nil then | ||
| 72 | _u53c2_u6570x = [[好 酷]] | ||
| 73 | end | ||
| 74 | return _u6253_u5370("吃米饭") | ||
| 75 | end | ||
| 76 | end | ||
| 77 | return _u6253_u5370(_u4f60_u597d) | ||
| 78 | end | ||
| 79 | __u65e0_u6548_u53d8_u91cf = function(self) end | ||
| 80 | __u65e0_u6548_u53d8_u91cf = function(self, _u53c2_u6570x, _u53c2_u6570y) end | ||
| 81 | __u65e0_u6548_u53d8_u91cf = function(self, _u53c2_u6570x, _u53c2_u6570y) | ||
| 82 | self["参数x"] = _u53c2_u6570x | ||
| 83 | self["参数y"] = _u53c2_u6570y | ||
| 84 | end | ||
| 85 | __u65e0_u6548_u53d8_u91cf = function(self, _u53c2_u6570x) | ||
| 86 | if _u53c2_u6570x == nil then | ||
| 87 | _u53c2_u6570x = 1 | ||
| 88 | end | ||
| 89 | end | ||
| 90 | __u65e0_u6548_u53d8_u91cf = function(self, _u53c2_u6570x, _u53c2_u6570y, _u53c2_u6570z) | ||
| 91 | if _u53c2_u6570x == nil then | ||
| 92 | _u53c2_u6570x = 1 | ||
| 93 | end | ||
| 94 | if _u53c2_u6570z == nil then | ||
| 95 | _u53c2_u6570z = "你好 世界" | ||
| 96 | end | ||
| 97 | self["参数x"] = _u53c2_u6570x | ||
| 98 | self["参数z"] = _u53c2_u6570z | ||
| 99 | end | ||
| 100 | _u53d8_u91cfx(function() | ||
| 101 | return | ||
| 102 | end) | ||
| 103 | _u53d8_u91cfy(function() | ||
| 104 | return 1 | ||
| 105 | end) | ||
| 106 | _u53d8_u91cfz(function() | ||
| 107 | return 1, "你好", "世界" | ||
| 108 | end) | ||
| 109 | _u53d8_u91cfk(function() | ||
| 110 | if _u662f then | ||
| 111 | return | ||
| 112 | else | ||
| 113 | return | ||
| 114 | end | ||
| 115 | end) | ||
| 116 | __u65e0_u6548_u53d8_u91cf = function() | ||
| 117 | if _u67d0_u7269 then | ||
| 118 | return _u771f_u540d | ||
| 119 | end | ||
| 120 | end | ||
| 121 | _u51fd_u6570d(function() | ||
| 122 | return _u6253_u5370("你好 世界") | ||
| 123 | end, 10) | ||
| 124 | _u51fd_u6570d(1, 2, 3, 4, 5, 6, (function() | ||
| 125 | if _u67d0_u7269 then | ||
| 126 | _u6253_u5370("okay") | ||
| 127 | return 10 | ||
| 128 | end | ||
| 129 | end)(), 10, 20) | ||
| 130 | _u51fd_u6570f()()(_u4ec0_u4e48)(function() | ||
| 131 | return _u6253_u5370("srue") | ||
| 132 | end, 123) | ||
| 133 | _u53d8_u91cfx = function(_u53c2_u6570a, _u53c2_u6570b) | ||
| 134 | return _u6253_u5370("什么") | ||
| 135 | end | ||
| 136 | local _u53d8_u91cfy | ||
| 137 | _u53d8_u91cfy = function(_u53c2_u6570a, _u53c2_u6570b) | ||
| 138 | if _u53c2_u6570a == nil then | ||
| 139 | _u53c2_u6570a = "hi" | ||
| 140 | end | ||
| 141 | if _u53c2_u6570b == nil then | ||
| 142 | _u53c2_u6570b = 23 | ||
| 143 | end | ||
| 144 | return _u6253_u5370("什么") | ||
| 145 | end | ||
| 146 | local _u53d8_u91cfz | ||
| 147 | _u53d8_u91cfz = function(_u53c2_u6570a, _u53c2_u6570b) | ||
| 148 | if _u53c2_u6570a == nil then | ||
| 149 | _u53c2_u6570a = "hi" | ||
| 150 | end | ||
| 151 | if _u53c2_u6570b == nil then | ||
| 152 | _u53c2_u6570b = 23 | ||
| 153 | end | ||
| 154 | return _u6253_u5370("什么") | ||
| 155 | end | ||
| 156 | local _u53d8_u91cfj | ||
| 157 | _u53d8_u91cfj = function(_u53c2_u6570f, _u53c2_u6570g, _u53c2_u6570m, _u53c2_u6570a, _u53c2_u6570b) | ||
| 158 | if _u53c2_u6570a == nil then | ||
| 159 | _u53c2_u6570a = "hi" | ||
| 160 | end | ||
| 161 | if _u53c2_u6570b == nil then | ||
| 162 | _u53c2_u6570b = 23 | ||
| 163 | end | ||
| 164 | return _u6253_u5370("什么") | ||
| 165 | end | ||
| 166 | _u53d8_u91cfy = function(_u53c2_u6570a, _u53c2_u6570b, ...) | ||
| 167 | if _u53c2_u6570a == nil then | ||
| 168 | _u53c2_u6570a = "hi" | ||
| 169 | end | ||
| 170 | if _u53c2_u6570b == nil then | ||
| 171 | _u53c2_u6570b = 23 | ||
| 172 | end | ||
| 173 | return _u6253_u5370("什么") | ||
| 174 | end | ||
| 175 | _u53d8_u91cfy = function(_u53c2_u6570a, _u53c2_u6570b, ...) | ||
| 176 | if _u53c2_u6570a == nil then | ||
| 177 | _u53c2_u6570a = "hi" | ||
| 178 | end | ||
| 179 | if _u53c2_u6570b == nil then | ||
| 180 | _u53c2_u6570b = 23 | ||
| 181 | end | ||
| 182 | return _u6253_u5370("什么") | ||
| 183 | end | ||
| 184 | local _u591a_u53c2_u6570 | ||
| 185 | _u591a_u53c2_u6570 = function(_u53c2_u6570a, _u53c2_u6570b) | ||
| 186 | return _u6253_u5370("什么") | ||
| 187 | end | ||
| 188 | _u591a_u53c2_u6570 = function(_u53c2_u6570a, _u53c2_u6570b) | ||
| 189 | if _u53c2_u6570a == nil then | ||
| 190 | _u53c2_u6570a = "hi" | ||
| 191 | end | ||
| 192 | if _u53c2_u6570b == nil then | ||
| 193 | _u53c2_u6570b = 23 | ||
| 194 | end | ||
| 195 | return _u6253_u5370("什么") | ||
| 196 | end | ||
| 197 | _u591a_u53c2_u6570 = function(_u53c2_u6570a, _u53c2_u6570b) | ||
| 198 | if _u53c2_u6570a == nil then | ||
| 199 | _u53c2_u6570a = "hi" | ||
| 200 | end | ||
| 201 | if _u53c2_u6570b == nil then | ||
| 202 | _u53c2_u6570b = 23 | ||
| 203 | end | ||
| 204 | return _u6253_u5370("什么") | ||
| 205 | end | ||
| 206 | _u591a_u53c2_u6570 = function(_u53c2_u6570f, _u53c2_u6570g, _u53c2_u6570m, _u53c2_u6570a, _u53c2_u6570b) | ||
| 207 | if _u53c2_u6570a == nil then | ||
| 208 | _u53c2_u6570a = "hi" | ||
| 209 | end | ||
| 210 | if _u53c2_u6570b == nil then | ||
| 211 | _u53c2_u6570b = 23 | ||
| 212 | end | ||
| 213 | return _u6253_u5370("什么") | ||
| 214 | end | ||
| 215 | local self | ||
| 216 | self = function(_u53c2_u6570n) | ||
| 217 | if _u53c2_u6570n == 0 then | ||
| 218 | return 1 | ||
| 219 | end | ||
| 220 | return _u53c2_u6570n * self(_u53c2_u6570n - 1) | ||
| 221 | end | ||
| 222 | return nil | ||
