Skip to content

Commit

Permalink
fix #709
Browse files Browse the repository at this point in the history
  • Loading branch information
sumneko committed Oct 8, 2021
1 parent 8bb6567 commit af1bfbd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
14 changes: 13 additions & 1 deletion script/parser/newparser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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

0 comments on commit af1bfbd

Please sign in to comment.