@@ -92,71 +92,6 @@ line_compile = {
9292 [" break" ] = function (self , node )
9393 return " break"
9494 end ,
95- import = function (self , node )
96- local _ , names , source = unpack (node )
97- local final_names , to_bind = { }, { }
98- local _list_0 = names
99- for _index_0 = 1 , # _list_0 do
100- local name = _list_0 [_index_0 ]
101- local final
102- if ntype (name ) == " :" then
103- local tmp = self :name (name [2 ])
104- to_bind [tmp ] = true
105- final = tmp
106- else
107- final = self :name (name )
108- end
109- self :put_name (final )
110- insert (final_names , final )
111- end
112- local get_value
113- get_value = function (name )
114- if to_bind [name ] then
115- return moonlib .bind (source , name )
116- else
117- return source .. " ." .. name
118- end
119- end
120- if type (source ) == " string" then
121- local values = (function ()
122- local _accum_0 = { }
123- local _len_0 = 0
124- local _list_1 = final_names
125- for _index_0 = 1 , # _list_1 do
126- local name = _list_1 [_index_0 ]
127- _len_0 = _len_0 + 1
128- _accum_0 [_len_0 ] = get_value (name )
129- end
130- return _accum_0
131- end )()
132- local line
133- do
134- local _with_0 = self :line (" local " , concat (final_names , " , " ), " = " )
135- _with_0 :append_list (values , " , " )
136- line = _with_0
137- end
138- return line
139- end
140- self :add (self :line (" local " , concat (final_names , " , " )))
141- do
142- local _with_0 = self :block (" do" )
143- source = _with_0 :init_free_var (" table" , source )
144- local _list_1 = final_names
145- for _index_0 = 1 , # _list_1 do
146- local name = _list_1 [_index_0 ]
147- _with_0 :stm ({
148- " assign" ,
149- {
150- name
151- },
152- {
153- get_value (name )
154- }
155- })
156- end
157- return _with_0
158- end
159- end ,
16095 [" if" ] = function (self , node )
16196 local cond , block = node [2 ], node [3 ]
16297 local root
0 commit comments