diff options
Diffstat (limited to 'server/src')
-rw-r--r-- | server/src/parser/ast.lua | 8 | ||||
-rw-r--r-- | server/src/parser/grammar.lua | 4 |
2 files changed, 10 insertions, 2 deletions
diff --git a/server/src/parser/ast.lua b/server/src/parser/ast.lua index 2096fd28..c419e50a 100644 --- a/server/src/parser/ast.lua +++ b/server/src/parser/ast.lua @@ -75,6 +75,12 @@ local defs = { } end, DirtyName = function (pos) + pushError { + type = 'MISS_NAME', + start = pos, + finish = pos, + level = 'error', + } return { type = 'name', start = pos, @@ -429,5 +435,5 @@ return function (self, lua, mode) pushError(err) return nil, Errs end - return res + return res, Errs end diff --git a/server/src/parser/grammar.lua b/server/src/parser/grammar.lua index 5ec5b826..7afea5e7 100644 --- a/server/src/parser/grammar.lua +++ b/server/src/parser/grammar.lua @@ -269,7 +269,9 @@ ExpList <- (COMMA DirtyExp)+ -> List NameList <- (COMMA MustName)+ -> List - / (Name (COMMA MustName)*)? + / (Name (COMMA MustName)*) + -> List + / DirtyName -> List ArgList <- (COMMA AfterArg)+ |