<commit_before>package org.toml.ide

import com.intellij.lexer.Lexer
import com.intellij.openapi.editor.DefaultLanguageHighlighterColors
import com.intellij.openapi.editor.colors.TextAttributesKey
import com.intellij.openapi.fileTypes.SyntaxHighlighterBase
import com.intellij.psi.tree.IElementType
import gnu.trove.THashMap
import org.toml.lang.core.lexer.TomlLexer
import org.toml.lang.core.psi.TomlTypes
import kotlin.collections.set


class TomlHighlighter : SyntaxHighlighterBase() {
    override fun getHighlightingLexer(): Lexer =
        TomlLexer()


    override fun getTokenHighlights(tokenType: IElementType?): Array<out TextAttributesKey> =
        pack(tokenType?.let { tokenMap[it] })


    private val tokenMap: Map<IElementType, TextAttributesKey> = makeTokenMap()

}

private fun makeTokenMap(): Map<IElementType, TextAttributesKey> {
    val result = THashMap<IElementType, TextAttributesKey>()<commit_msg>(MISC): remove  unnecessary import<commit_after>package org.toml.ide

import com.intellij.lexer.Lexer
import com.intellij.openapi.editor.DefaultLanguageHighlighterColors
import com.intellij.openapi.editor.colors.TextAttributesKey
import com.intellij.openapi.fileTypes.SyntaxHighlighterBase
import com.intellij.psi.tree.IElementType
import gnu.trove.THashMap
import org.toml.lang.core.lexer.TomlLexer
import org.toml.lang.core.psi.TomlTypes


class TomlHighlighter : SyntaxHighlighterBase() {
    override fun getHighlightingLexer(): Lexer =
        TomlLexer()


    override fun getTokenHighlights(tokenType: IElementType?): Array<out TextAttributesKey> =
        pack(tokenType?.let { tokenMap[it] })


    private val tokenMap: Map<IElementType, TextAttributesKey> = makeTokenMap()

}

private fun makeTokenMap(): Map<IElementType, TextAttributesKey> {
    val result = THashMap<IElementType, TextAttributesKey>()
{'fraction_non_alphanumeric': 0.09397066811515481, 'fraction_numerical': 0.0, 'mean_word_length': 5.649819494584838, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1362617', 'n_tokens_mistral': 606, 'n_tokens_neox': 585, 'n_words': 102}