package com.christofferklang.pyxl.parsing;

import com.christofferklang.pyxl.PyxlElementTypes;
import com.christofferklang.pyxl.PyxlTokenTypes;
import com.intellij.lang.PsiParser;
import com.intellij.lexer.Lexer;
import com.intellij.openapi.project.Project;
import com.intellij.psi.tree.TokenSet;
import com.jetbrains.python.PythonParserDefinition;
import com.jetbrains.python.lexer.PythonIndentingProcessor;
import org.jetbrains.annotations.NotNull;

import java.io.Reader;

public class PyxlParserDefinition extends PythonParserDefinition {

    @NotNull
    @Override
    public Lexer createLexer(Project project) {
        return new PyxlIndentingLexer();
    }

    @NotNull
    public PsiParser createParser(Project project) {
        return new PyxlParser();
    }

    @NotNull
    @Override
    public TokenSet getStringLiteralElements() {
        return TokenSet.orSet(super.getStringLiteralElements(), TokenSet.create(PyxlTokenTypes.STRING));
    }
}

@@ -41,59 +41,8 @@
 g;%0A%0A
-import com.christofferklang.pyxl.PyxlElementTypes;%0A
 impo
@@ -295,68 +295,8 @@
 on;%0A
-import com.jetbrains.python.lexer.PythonIndentingProcessor;%0A
 impo
@@ -338,32 +338,8 @@
 l;%0A%0A
-import java.io.Reader;%0A%0A
 publ

Remove unused imports