diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-10-10 16:03:28 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-10-10 16:03:28 +0800 |
commit | c80ebc80ec68909cb890cccba05ba5fded59b645 (patch) | |
tree | 3687a0438d81b2aebb013557798b773076e922fa /server-beta/src/parser | |
parent | 63f8fe059b3b429baf0e10969a259beecaddbaad (diff) | |
download | lua-language-server-c80ebc80ec68909cb890cccba05ba5fded59b645.zip |
支持_G
Diffstat (limited to 'server-beta/src/parser')
-rw-r--r-- | server-beta/src/parser/guide.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/server-beta/src/parser/guide.lua b/server-beta/src/parser/guide.lua index 2120fe48..9530f9ce 100644 --- a/server-beta/src/parser/guide.lua +++ b/server-beta/src/parser/guide.lua @@ -405,4 +405,11 @@ function m.getKeyName(obj) return nil end +function m.getENV(ast) + if ast.type ~= 'main' then + return nil + end + return ast.locals[1] +end + return m |