diff options
author | sumneko <sumneko@hotmail.com> | 2019-04-22 20:59:16 +0800 |
---|---|---|
committer | sumneko <sumneko@hotmail.com> | 2019-04-22 20:59:16 +0800 |
commit | b741082ca2efc42c62bce3c2634aaec25145b93e (patch) | |
tree | dc8cf9ef406abe74e96ec88e29903fed0dff2b70 /server/src/parser | |
parent | 01143c5e09c15c4aae278a2728db753619b35530 (diff) | |
parent | f98ffdd94500e6bb0441401c7de36325b01d5e02 (diff) | |
download | lua-language-server-b741082ca2efc42c62bce3c2634aaec25145b93e.zip |
Merge branch 'master' into EmmyLua
Diffstat (limited to 'server/src/parser')
-rw-r--r-- | server/src/parser/ast.lua | 11 | ||||
-rw-r--r-- | server/src/parser/grammar.lua | 5 |
2 files changed, 14 insertions, 2 deletions
diff --git a/server/src/parser/ast.lua b/server/src/parser/ast.lua index 55364ca9..f7a94dfc 100644 --- a/server/src/parser/ast.lua +++ b/server/src/parser/ast.lua @@ -1235,6 +1235,17 @@ local Defs = { symbol = symbol, } } + return + end, + UnknownAction = function (start, symbol) + pushError { + type = 'UNKNOWN_SYMBOL', + start = start, + finish = start + #symbol - 1, + info = { + symbol = symbol, + } + } return false end, DirtyName = function (pos) diff --git a/server/src/parser/grammar.lua b/server/src/parser/grammar.lua index 42e52d05..b5e083e6 100644 --- a/server/src/parser/grammar.lua +++ b/server/src/parser/grammar.lua @@ -55,6 +55,7 @@ defs.er = '\r' defs.et = '\t' defs.ev = '\v' defs['nil'] = m.Cp() / function () return nil end +defs['false'] = m.Cp() / function () return false end defs.NotReserved = function (_, _, str) if RESERVED[str] then return false @@ -386,9 +387,9 @@ CrtAction <- Semicolon / Call / ExpInAction UnkAction <- ({} {Word+}) - -> UnknownSymbol + -> UnknownAction / ({} {. (!Sps !CrtAction .)*}) - -> UnknownSymbol + -> UnknownAction ExpInAction <- Sp ({} Exp {}) -> ExpInAction |