package com.christofferklang.pyxl.parsing;

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();
    }

    private class PyxlIndentingLexer extends PythonIndentingProcessor {
        public PyxlIndentingLexer() {
            super(new PyxlLexer((Reader) null), TokenSet.EMPTY);
        }
    }
}

@@ -37,16 +37,116 @@
 rsing;%0A%0A
+import com.christofferklang.pyxl.PyxlElementTypes;%0Aimport com.christofferklang.pyxl.PyxlTokenTypes;%0A
 import c
@@ -762,24 +762,212 @@
 r();%0A    %7D%0A%0A
+    @NotNull%0A    @Override%0A    public TokenSet getStringLiteralElements() %7B%0A        return TokenSet.orSet(super.getStringLiteralElements(), TokenSet.create(PyxlTokenTypes.STRING));%0A    %7D%0A%0A
     private 

Recognize pyxl strings as strings in the parser