Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
lua-aplicado/lua-aplicado/chunk_inspector.lua
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
50 lines (39 sloc)
1.19 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -------------------------------------------------------------------------------- | |
| -- 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; | |
| } |