Skip to content

Commit 3018f4e

Browse files
committed
fix
1 parent c69dd7e commit 3018f4e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/luacheck/parser.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -381,8 +381,8 @@ simple_expressions["{"] = function(state)
381381
local key_node, value_node
382382
local first_token_range = copy_range(state)
383383

384-
if state.token == "name" then
385-
local name = state.token_value
384+
if state.token == "name" or state.token == "global" then
385+
local name = state.token == "global" and "global" or state.token_value
386386
skip_token(state) -- Skip name.
387387

388388
if test_and_skip_token(state, "=") then

0 commit comments

Comments
 (0)