Skip to content

Commit 0c44a76

Browse files
committed
fix
1 parent b876f54 commit 0c44a76

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

src/cm/modes/luau/index.ts

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -169,15 +169,7 @@ const typeTerminators = new Set([
169169
"while",
170170
]);
171171

172-
const indentTokens = new Set([
173-
"do",
174-
"for",
175-
"function",
176-
"if",
177-
"repeat",
178-
"(",
179-
"{",
180-
]);
172+
const indentTokens = new Set(["do", "function", "if", "repeat", "(", "{"]);
181173
const dedentTokens = new Set(["end", "until", ")", "}"]);
182174
const dedentPartial = /^(?:end|until|\)|}|else|elseif)\b/;
183175

@@ -699,6 +691,9 @@ const normal: Tokenizer = (stream, state) => {
699691
if (char === "(" && state.expectFunctionName) {
700692
state.expectFunctionName = false;
701693
}
694+
if (char === "(") {
695+
state.expectTypeName = false;
696+
}
702697
if (state.inType) state.typeDepth++;
703698
state.lastIdentifierWasStandard = false;
704699
if (state.afterTypeName && char === "(") {

0 commit comments

Comments
 (0)