summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--changelog.md1
-rw-r--r--script/parser/newparser.lua14
2 files changed, 14 insertions, 1 deletions
diff --git a/changelog.md b/changelog.md
index 3ade8c93..5b58f21b 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,6 +1,7 @@
# changelog
## 2.4.2
+* `FIX` [#707](https://github.com/sumneko/lua-language-server/issues/707)
* `FIX` [#709](https://github.com/sumneko/lua-language-server/issues/709)
## 2.4.1
diff --git a/script/parser/newparser.lua b/script/parser/newparser.lua
index 1fd395e5..c110ca2d 100644
--- a/script/parser/newparser.lua
+++ b/script/parser/newparser.lua
@@ -496,7 +496,7 @@ local function skipComment(isAction)
pushCommentHeadError(left)
end
Index = Index + 2
- local longComment = parseLongString()
+ local longComment = start + 2 == Tokens[Index] and parseLongString()
if longComment then
longComment.type = 'comment.long'
longComment.text = longComment[1]
@@ -3640,14 +3640,26 @@ return function (lua, mode, version, options)
State.ast = parseString()
elseif mode == 'Number' then
State.ast = parseNumber()
+ elseif mode == 'Name' then
+ State.ast = parseName()
elseif mode == 'Exp' then
State.ast = parseExp()
elseif mode == 'Action' then
State.ast = parseAction()
end
+
if State.ast then
State.ast.state = State
end
+ while true do
+ if Index <= #Tokens then
+ unknownSymbol()
+ Index = Index + 2
+ else
+ break
+ end
+ end
+
return State
end