There was an error while loading. Please reload this page.
1 parent c69dd7e commit 3018f4eCopy full SHA for 3018f4e
1 file changed
src/luacheck/parser.lua
@@ -381,8 +381,8 @@ simple_expressions["{"] = function(state)
381
local key_node, value_node
382
local first_token_range = copy_range(state)
383
384
- if state.token == "name" then
385
- local name = state.token_value
+ if state.token == "name" or state.token == "global" then
+ local name = state.token == "global" and "global" or state.token_value
386
skip_token(state) -- Skip name.
387
388
if test_and_skip_token(state, "=") then
0 commit comments