/
chunk_inspector.lua
50 lines (39 loc) · 1.19 KB
/
chunk_inspector.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
--------------------------------------------------------------------------------
-- chunk_inspector.lua: basic Lua chunk inspector with support for LJ2
-- This file is a part of Lua-Aplicado library
-- Copyright (c) Lua-Aplicado authors (see file `COPYRIGHT` for the license)
--------------------------------------------------------------------------------
local arguments,
optional_arguments,
method_arguments,
eat_true
= import 'lua-nucleo/args.lua'
{
'arguments',
'optional_arguments',
'method_arguments',
'eat_true'
}
local running_under_luajit
= import 'lua-aplicado/luajit2.lua'
{
'running_under_luajit'
}
--------------------------------------------------------------------------------
local make_chunk_inspector
if not running_under_luajit() then
make_chunk_inspector = import 'lua-aplicado/bci_chunk_inspector.lua'
{
'make_chunk_inspector'
}
else
make_chunk_inspector = import 'lua-aplicado/lj2_chunk_inspector.lua'
{
'make_chunk_inspector'
}
end
--------------------------------------------------------------------------------
return
{
make_chunk_inspector = make_chunk_inspector;
}