summaryrefslogtreecommitdiff
path: root/script/parser
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-10-21 17:30:50 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-10-21 17:30:50 +0800
commit398cf9df7149bcda179ba2609989271219fc4f3c (patch)
treea5903b3d7cc4a754b055aa8aef6c00e897fe6554 /script/parser
parentcbb233f8725e580ee591302a82e672879e994036 (diff)
downloadlua-language-server-398cf9df7149bcda179ba2609989271219fc4f3c.zip
fix #748
Diffstat (limited to 'script/parser')
-rw-r--r--script/parser/newparser.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/script/parser/newparser.lua b/script/parser/newparser.lua
index c160889b..23b8d07e 100644
--- a/script/parser/newparser.lua
+++ b/script/parser/newparser.lua
@@ -606,6 +606,14 @@ local function parseLocalAttrs()
attr[1] = word
attr.finish = wfinish
Index = Index + 2
+ if word ~= 'const'
+ and word ~= 'close' then
+ pushError {
+ type = 'UNKNOWN_ATTRIBUTE',
+ start = wstart,
+ finish = wfinish,
+ }
+ end
else
missName()
end