diff options
author | Li Jin <dragon-fly@qq.com> | 2022-05-16 09:45:04 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2022-05-16 09:45:27 +0800 |
commit | a9fe6a5c4c17cf7e8305c1d614939ce510fb1103 (patch) | |
tree | 404509931668656356cce49493f10e27d1cc32e6 /spec/outputs/attrib.lua | |
parent | c4935826eea8df7a161b2b4ba9262dce66d9d366 (diff) | |
download | yuescript-a9fe6a5c4c17cf7e8305c1d614939ce510fb1103.tar.gz yuescript-a9fe6a5c4c17cf7e8305c1d614939ce510fb1103.tar.bz2 yuescript-a9fe6a5c4c17cf7e8305c1d614939ce510fb1103.zip |
fix issue #97 by line decorator.
Diffstat (limited to 'spec/outputs/attrib.lua')
-rw-r--r-- | spec/outputs/attrib.lua | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/spec/outputs/attrib.lua b/spec/outputs/attrib.lua index d9ac3f2..aed549d 100644 --- a/spec/outputs/attrib.lua +++ b/spec/outputs/attrib.lua | |||
@@ -25,6 +25,45 @@ do | |||
25 | end)() | 25 | end)() |
26 | end | 26 | end |
27 | do | 27 | do |
28 | local a <const> = (function() | ||
29 | if true then | ||
30 | return 1 | ||
31 | end | ||
32 | end)() | ||
33 | local b <close> = (function() | ||
34 | if not false then | ||
35 | return ((function() | ||
36 | if x then | ||
37 | return 1 | ||
38 | end | ||
39 | end)()) | ||
40 | end | ||
41 | end)() | ||
42 | local c <const> = (function() | ||
43 | if true then | ||
44 | return ((function() | ||
45 | local _exp_0 = x | ||
46 | if "abc" == _exp_0 then | ||
47 | return 998 | ||
48 | end | ||
49 | end)()) | ||
50 | end | ||
51 | end)() | ||
52 | local d <close> = (function() | ||
53 | if (function() | ||
54 | if a ~= nil then | ||
55 | return a | ||
56 | else | ||
57 | return b | ||
58 | end | ||
59 | end)() then | ||
60 | return { | ||
61 | value = value | ||
62 | } | ||
63 | end | ||
64 | end)() | ||
65 | end | ||
66 | do | ||
28 | local _ <close> = (function() | 67 | local _ <close> = (function() |
29 | local _with_0 = io.open("file.txt") | 68 | local _with_0 = io.open("file.txt") |
30 | _with_0:write("Hello") | 69 | _with_0:write("Hello") |