File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -163,8 +163,9 @@ local function parseTokens(text, offset)
163163 Ci = 0
164164end
165165
166- local function peekToken ()
167- return TokenTypes [Ci + 1 ], TokenContents [Ci + 1 ]
166+ local function peekToken (offset )
167+ offset = offset or 1
168+ return TokenTypes [Ci + offset ], TokenContents [Ci + offset ]
168169end
169170
170171--- @return string ? tokenType
@@ -992,8 +993,12 @@ local docSwitch = util.switch()
992993 if value == ' public'
993994 or value == ' protected'
994995 or value == ' private'
995- or value == ' public'
996996 or value == ' package' then
997+ local tp2 = peekToken (1 )
998+ local tp3 = peekToken (2 )
999+ if tp2 == ' name' and not tp3 then
1000+ return false
1001+ end
9971002 result .visible = value
9981003 result .start = getStart ()
9991004 return true
You can’t perform that action at this time.
0 commit comments