summaryrefslogtreecommitdiff
path: root/server-beta
diff options
context:
space:
mode:
Diffstat (limited to 'server-beta')
-rw-r--r--server-beta/src/parser/compile.lua18
1 files changed, 18 insertions, 0 deletions
diff --git a/server-beta/src/parser/compile.lua b/server-beta/src/parser/compile.lua
index 6479106f..e110d08c 100644
--- a/server-beta/src/parser/compile.lua
+++ b/server-beta/src/parser/compile.lua
@@ -151,6 +151,24 @@ local vmMap = {
obj.type = 'setlocal'
obj.loc = loc
addRef(loc, obj)
+ if loc.attrs then
+ local const
+ for i = 1, #loc.attrs do
+ local attr = loc.attrs[i][1]
+ if attr == 'const'
+ or attr == 'close' then
+ const = true
+ break
+ end
+ end
+ if const then
+ pushError {
+ type = 'SET_CONST',
+ start = obj.start,
+ finish = obj.finish,
+ }
+ end
+ end
else
obj.type = 'setglobal'
if ENVMode == '_ENV' then