// Path: src/main/java/org/antlr/jetbrains/st4plugin/STLanguage.java
// public class STLanguage extends Language {
// 
//     public static final STLanguage INSTANCE = new STLanguage();
// 
//     private STLanguage() {
//         super("ST");
//     }
// }
// 
// Path: src/main/java/org/antlr/jetbrains/st4plugin/psi/STTokenTypes.java
// public class STTokenTypes {
// 
//     private static final List<TokenIElementType> TOKEN_ELEMENT_TYPES = PSIElementTypeFactory.getTokenIElementTypes(STLanguage.INSTANCE);
//     private static final List<RuleIElementType> RULE_ELEMENT_TYPES = PSIElementTypeFactory.getRuleIElementTypes(STLanguage.INSTANCE);
// 
//     public static RuleIElementType getRuleElementType(@MagicConstant(valuesFromClass = STParser.class) int ruleIndex) {
//         return RULE_ELEMENT_TYPES.get(ruleIndex);
//     }
// 
//     public static TokenIElementType getTokenElementType(@MagicConstant(valuesFromClass = STLexer.class) int ruleIndex) {
//         return TOKEN_ELEMENT_TYPES.get(ruleIndex);
//     }
// }
// 
// Path: src/main/java/org/antlr/jetbrains/st4plugin/psi/STTokenTypes.java
// public static TokenIElementType getTokenElementType(@MagicConstant(valuesFromClass = STLexer.class) int ruleIndex) {
//     return TOKEN_ELEMENT_TYPES.get(ruleIndex);
// }


import com.intellij.lexer.Lexer;
import com.intellij.openapi.editor.DefaultLanguageHighlighterColors;
import com.intellij.openapi.editor.HighlighterColors;
import com.intellij.openapi.editor.colors.TextAttributesKey;
import com.intellij.openapi.fileTypes.SyntaxHighlighterBase;
import com.intellij.psi.tree.IElementType;
import org.antlr.intellij.adaptor.lexer.ANTLRLexerAdaptor;
import org.antlr.jetbrains.st4plugin.STLanguage;
import org.antlr.jetbrains.st4plugin.parsing.STLexer;
import org.antlr.jetbrains.st4plugin.psi.STTokenTypes;
import org.jetbrains.annotations.NotNull;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import static com.intellij.openapi.editor.colors.TextAttributesKey.createTextAttributesKey;
import static org.antlr.jetbrains.st4plugin.psi.STTokenTypes.getTokenElementType;
package org.antlr.jetbrains.st4plugin.highlight;




public class STSyntaxHighlighter extends SyntaxHighlighterBase {

    public static final TextAttributesKey STGroup_TEMPLATE_TEXT =
            createTextAttributesKey("STGroup_TEMPLATE_TEXT", DefaultLanguageHighlighterColors.TEMPLATE_LANGUAGE_COLOR);

    private static final List<IElementType> KEYWORDS = Stream.of(
            STLexer.IF, STLexer.ELSE, STLexer.END, STLexer.TRUE,
            STLexer.FALSE, STLexer.ELSEIF, STLexer.ENDIF, STLexer.SUPER
// Path: src/main/java/org/antlr/jetbrains/st4plugin/STLanguage.java
// public class STLanguage extends Language {
// 
//     public static final STLanguage INSTANCE = new STLanguage();
// 
//     private STLanguage() {
//         super("ST");
//     }
// }
// 
// Path: src/main/java/org/antlr/jetbrains/st4plugin/psi/STTokenTypes.java
// public class STTokenTypes {
// 
//     private static final List<TokenIElementType> TOKEN_ELEMENT_TYPES = PSIElementTypeFactory.getTokenIElementTypes(STLanguage.INSTANCE);
//     private static final List<RuleIElementType> RULE_ELEMENT_TYPES = PSIElementTypeFactory.getRuleIElementTypes(STLanguage.INSTANCE);
// 
//     public static RuleIElementType getRuleElementType(@MagicConstant(valuesFromClass = STParser.class) int ruleIndex) {
//         return RULE_ELEMENT_TYPES.get(ruleIndex);
//     }
// 
//     public static TokenIElementType getTokenElementType(@MagicConstant(valuesFromClass = STLexer.class) int ruleIndex) {
//         return TOKEN_ELEMENT_TYPES.get(ruleIndex);
//     }
// }
// 
// Path: src/main/java/org/antlr/jetbrains/st4plugin/psi/STTokenTypes.java
// public static TokenIElementType getTokenElementType(@MagicConstant(valuesFromClass = STLexer.class) int ruleIndex) {
//     return TOKEN_ELEMENT_TYPES.get(ruleIndex);
// }


// Path: src/main/java/org/antlr/jetbrains/st4plugin/highlight/STSyntaxHighlighter.java
import com.intellij.lexer.Lexer;
import com.intellij.openapi.editor.DefaultLanguageHighlighterColors;
import com.intellij.openapi.editor.HighlighterColors;
import com.intellij.openapi.editor.colors.TextAttributesKey;
import com.intellij.openapi.fileTypes.SyntaxHighlighterBase;
import com.intellij.psi.tree.IElementType;
import org.antlr.intellij.adaptor.lexer.ANTLRLexerAdaptor;
import org.antlr.jetbrains.st4plugin.STLanguage;
import org.antlr.jetbrains.st4plugin.parsing.STLexer;
import org.antlr.jetbrains.st4plugin.psi.STTokenTypes;
import org.jetbrains.annotations.NotNull;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import static com.intellij.openapi.editor.colors.TextAttributesKey.createTextAttributesKey;
import static org.antlr.jetbrains.st4plugin.psi.STTokenTypes.getTokenElementType;

package org.antlr.jetbrains.st4plugin.highlight;




public class STSyntaxHighlighter extends SyntaxHighlighterBase {

    public static final TextAttributesKey STGroup_TEMPLATE_TEXT =
            createTextAttributesKey("STGroup_TEMPLATE_TEXT", DefaultLanguageHighlighterColors.TEMPLATE_LANGUAGE_COLOR);

    private static final List<IElementType> KEYWORDS = Stream.of(
            STLexer.IF, STLexer.ELSE, STLexer.END, STLexer.TRUE,
            STLexer.FALSE, STLexer.ELSEIF, STLexer.ENDIF, STLexer.SUPER
    ).map(STTokenTypes::getTokenElementType).collect(Collectors.toList());