Skip to content

Commit

Permalink
[Lua] Fix separators in expression statements
Browse files Browse the repository at this point in the history
  • Loading branch information
mbartlett21 committed Feb 6, 2025
1 parent 74b967a commit e8c818c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Lua/Lua.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ contexts:
scope: invalid.illegal.unexpected-end.lua

- match: (?=\S)
push: expression-stmt
push: expression-list-stmt

block-contents:
- meta_scope: meta.block.lua
Expand Down
14 changes: 10 additions & 4 deletions Lua/tests/syntax_test_lua.lua
Original file line number Diff line number Diff line change
Expand Up @@ -739,16 +739,22 @@
-- ^ meta.number.integer.decimal constant.numeric.value
-- ^ punctuation.terminator.statement

local a = b = c d = e
local a = b = c
-- ^^^^^ storage.modifier
-- ^ variable.other
-- ^ keyword.operator.assignment
-- ^ variable.other
-- ^ invalid.illegal.invalid-operator
-- ^ variable.other
-- ^ variable.other
-- ^ keyword.operator.assignment
-- ^ variable.other

d, e = f, g
-- ^ variable.other
-- ^ punctuation.separator.comma
-- ^ variable.other
-- ^ keyword.operator.assignment
-- ^ variable.other
-- ^ punctuation.separator.comma
-- ^ variable.other

local x <const>, y < const > = 1, 2;
-- ^^^^^ storage.modifier.lua
Expand Down

0 comments on commit e8c818c

Please sign in to comment.