diff options
| author | Li Jin <dragon-fly@qq.com> | 2020-04-21 15:26:48 +0800 |
|---|---|---|
| committer | Li Jin <dragon-fly@qq.com> | 2020-04-21 15:26:48 +0800 |
| commit | 3af701f4f06d09e45eb65ff4eb9a591bc7ca4a3a (patch) | |
| tree | ab31d51f94baa8f79907bd8c4c04ed06959ec2d2 /src/MoonP/moonplus.h | |
| parent | e513c1e9da47bc03a8d5296d69c019639469c42d (diff) | |
| download | yuescript-3af701f4f06d09e45eb65ff4eb9a591bc7ca4a3a.tar.gz yuescript-3af701f4f06d09e45eb65ff4eb9a591bc7ca4a3a.tar.bz2 yuescript-3af701f4f06d09e45eb65ff4eb9a591bc7ca4a3a.zip | |
allow implicit return block macro, fix compiled Lua codes searching issue.
Diffstat (limited to 'src/MoonP/moonplus.h')
| -rw-r--r-- | src/MoonP/moonplus.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/MoonP/moonplus.h b/src/MoonP/moonplus.h index 7059286..83d4c75 100644 --- a/src/MoonP/moonplus.h +++ b/src/MoonP/moonplus.h | |||
| @@ -27,8 +27,8 @@ local lua = { | |||
| 27 | loadstring = loadstring, | 27 | loadstring = loadstring, |
| 28 | load = load | 28 | load = load |
| 29 | } | 29 | } |
| 30 | local dirsep, split, get_options, create_moonpath, moon_loader, load_text, moon_call, loadstring, loadfile, dofile, insert_loader, remove_loader, moon_require, find_modulepath | 30 | local split, get_options, create_moonpath, moon_loader, load_text, moon_call, loadstring, loadfile, dofile, insert_loader, remove_loader, moon_require, find_modulepath |
| 31 | dirsep = "/" | 31 | moonp.dirsep = "/" |
| 32 | moonp.moon_compiled = { } | 32 | moonp.moon_compiled = { } |
| 33 | moonp.file_exist = function(fname) | 33 | moonp.file_exist = function(fname) |
| 34 | local file = io.open(fname) | 34 | local file = io.open(fname) |
| @@ -103,7 +103,7 @@ find_modulepath = function(name) | |||
| 103 | if not package.moonpath then | 103 | if not package.moonpath then |
| 104 | package.moonpath = create_moonpath(package.path) | 104 | package.moonpath = create_moonpath(package.path) |
| 105 | end | 105 | end |
| 106 | local name_path = name:gsub("%.", dirsep) | 106 | local name_path = name:gsub("%.", moonp.dirsep) |
| 107 | local file_exist, file_path | 107 | local file_exist, file_path |
| 108 | for path in package.moonpath:gmatch("[^;]+") do | 108 | for path in package.moonpath:gmatch("[^;]+") do |
| 109 | file_path = path:gsub("?", name_path) | 109 | file_path = path:gsub("?", name_path) |
