Moved require to top level.
This commit is contained in:
parent
80167c9df2
commit
31e1bfa58f
@ -5,6 +5,7 @@ do
|
|||||||
end
|
end
|
||||||
local Source
|
local Source
|
||||||
Source = require("code_obj").Source
|
Source = require("code_obj").Source
|
||||||
|
local Files = require('files')
|
||||||
local unpack = unpack or table.unpack
|
local unpack = unpack or table.unpack
|
||||||
local as_lua
|
local as_lua
|
||||||
as_lua = function(self)
|
as_lua = function(self)
|
||||||
@ -213,7 +214,6 @@ do
|
|||||||
self.source_code_for_tree = setmetatable({ }, {
|
self.source_code_for_tree = setmetatable({ }, {
|
||||||
__index = function(self, t)
|
__index = function(self, t)
|
||||||
local s = t.source
|
local s = t.source
|
||||||
local Files = require('files')
|
|
||||||
local f = Files.read(s.filename)
|
local f = Files.read(s.filename)
|
||||||
return f
|
return f
|
||||||
end,
|
end,
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
-- as well as the logic for converting them to Lua code.
|
-- as well as the logic for converting them to Lua code.
|
||||||
{:insert, :remove, :concat} = table
|
{:insert, :remove, :concat} = table
|
||||||
{:Source} = require "code_obj"
|
{:Source} = require "code_obj"
|
||||||
|
Files = require 'files'
|
||||||
unpack or= table.unpack
|
unpack or= table.unpack
|
||||||
|
|
||||||
as_lua = =>
|
as_lua = =>
|
||||||
@ -39,7 +40,6 @@ class SyntaxTree
|
|||||||
@source_code_for_tree: setmetatable({}, {
|
@source_code_for_tree: setmetatable({}, {
|
||||||
__index:(t)=>
|
__index:(t)=>
|
||||||
s = t.source
|
s = t.source
|
||||||
Files = require 'files'
|
|
||||||
f = Files.read(s.filename)
|
f = Files.read(s.filename)
|
||||||
return f
|
return f
|
||||||
__mode: "k"
|
__mode: "k"
|
||||||
|
Loading…
Reference in New Issue
Block a user