Whoops, I had two things called scopeTracker #26

Merged
probablycorey merged 6 commits from name-things-better into main 2025-11-07 00:58:36 +00:00
Showing only changes of commit 47d1ea1a0b - Show all commits

View File

@ -12,7 +12,7 @@ import { ScopeTracker } from './scopeTracker'
export const TOKEN_TYPES = [
SemanticTokenTypes.function,
SemanticTokenTypes.variable,
SemanticTokenTypes.string,
'string.quoted',
SemanticTokenTypes.number,
SemanticTokenTypes.operator,
SemanticTokenTypes.keyword,
@ -161,7 +161,7 @@ function getTokenType(
// If not in scope, treat as string (like a Word)
if (!scopeTracker.isInScope(identifierText, node)) {
return {
type: TOKEN_TYPES.indexOf(SemanticTokenTypes.string),
type: TOKEN_TYPES.indexOf('string.quoted'),
modifiers: 0,
}
}
@ -188,9 +188,14 @@ function getTokenType(
case Terms.String:
case Terms.StringFragment:
return {
type: TOKEN_TYPES.indexOf('string.quoted'),
modifiers: 0,
}
case Terms.Word:
return {
type: TOKEN_TYPES.indexOf(SemanticTokenTypes.string),
type: TOKEN_TYPES.indexOf('string.quoted'),
modifiers: 0,
}