codeSyntaxRole function
The role a scope name carries, or null when it has no distinct one.
Implementation
CodeSyntaxRole? codeSyntaxRole(String? kind) => switch (kind) {
'keyword' || 'selector-tag' || 'meta' => CodeSyntaxRole.keyword,
'string' || 'regexp' || 'attr' || 'selector-attr' => CodeSyntaxRole.string,
'number' ||
'constant' ||
'boolean' ||
'literal' ||
'built_in' => CodeSyntaxRole.number,
'comment' || 'doctag' => CodeSyntaxRole.comment,
'title' ||
'function' ||
'constructor' ||
'type' ||
'class' => CodeSyntaxRole.function,
'variable' ||
'property' ||
'tag' ||
'params' ||
'attribute' ||
'selector-class' => CodeSyntaxRole.variable,
_ => null,
};