diff options
| author | Li Jin <dragon-fly@qq.com> | 2023-09-22 11:53:24 +0800 |
|---|---|---|
| committer | Li Jin <dragon-fly@qq.com> | 2023-09-22 11:53:24 +0800 |
| commit | cf2e784581df4d24b03b85f0ac02514a166150b6 (patch) | |
| tree | 2c7bcd1e5c27ae7018b30843b175ecfadbd6af96 /spec | |
| parent | 42f973f85ba7e3934111aa53588b43049c123a56 (diff) | |
| download | yuescript-cf2e784581df4d24b03b85f0ac02514a166150b6.tar.gz yuescript-cf2e784581df4d24b03b85f0ac02514a166150b6.tar.bz2 yuescript-cf2e784581df4d24b03b85f0ac02514a166150b6.zip | |
fixing issue #149.
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/inputs/import.yue | 4 | ||||
| -rw-r--r-- | spec/outputs/import.lua | 23 |
2 files changed, 27 insertions, 0 deletions
diff --git a/spec/inputs/import.yue b/spec/inputs/import.yue index 73e05d2..eb2a487 100644 --- a/spec/inputs/import.yue +++ b/spec/inputs/import.yue | |||
| @@ -41,6 +41,10 @@ do | |||
| 41 | c | 41 | c |
| 42 | from z | 42 | from z |
| 43 | 43 | ||
| 44 | do | ||
| 45 | import p from "yue" | ||
| 46 | import item from 'module.part' | ||
| 47 | import x1, y1, \z1 from "mymodule" | ||
| 44 | 48 | ||
| 45 | do | 49 | do |
| 46 | import 'module' | 50 | import 'module' |
diff --git a/spec/outputs/import.lua b/spec/outputs/import.lua index 02fe42a..b384d9d 100644 --- a/spec/outputs/import.lua +++ b/spec/outputs/import.lua | |||
| @@ -57,6 +57,29 @@ do | |||
| 57 | local a, b, c = z.a, z.b, z.c | 57 | local a, b, c = z.a, z.b, z.c |
| 58 | end | 58 | end |
| 59 | do | 59 | do |
| 60 | local p | ||
| 61 | do | ||
| 62 | local _obj_1 = require("yue") | ||
| 63 | p = _obj_1.p | ||
| 64 | end | ||
| 65 | local item | ||
| 66 | do | ||
| 67 | local _obj_1 = require('module.part') | ||
| 68 | item = _obj_1.item | ||
| 69 | end | ||
| 70 | local x1, y1, z1 | ||
| 71 | do | ||
| 72 | local _obj_1 = require("mymodule") | ||
| 73 | x1, y1, z1 = _obj_1.x1, _obj_1.y1, (function() | ||
| 74 | local _base_0 = _obj_1 | ||
| 75 | local _fn_0 = _base_0.z1 | ||
| 76 | return _fn_0 and function(...) | ||
| 77 | return _fn_0(_base_0, ...) | ||
| 78 | end | ||
| 79 | end)() | ||
| 80 | end | ||
| 81 | end | ||
| 82 | do | ||
| 60 | local module = require('module') | 83 | local module = require('module') |
| 61 | local module_x = require('module_x') | 84 | local module_x = require('module_x') |
| 62 | local d_a_s_h_e_s = require("d-a-s-h-e-s") | 85 | local d_a_s_h_e_s = require("d-a-s-h-e-s") |
