Lexer () { LayeredLexer ret = new LayeredLexer(createHighlightingLexer(myLanguageLevel)); ret.registerLayer( new PyStringLiteralLexer(PyTokenTypes.SINGLE_QUOTED_STRING), PyTokenTypes.SINGLE_QUOTED_STRING ); ret.registerLayer( new PyStringLiteralLexer(PyTokenTypes.SINGLE_QUOTED_UNICODE), PyTokenTypes.SINGLE_QUOTED_UNICODE ); ret.registerLayer( new PyStringLiteralLexer(PyTokenTypes.TRIPLE_QUOTED_STRING), PyTokenTypes.TRIPLE_QUOTED_STRING ); ret.registerLayer( new PyStringLiteralLexer(PyTokenTypes.TRIPLE_QUOTED_UNICODE), PyTokenTypes.TRIPLE_QUOTED_UNICODE ); ret.registerLayer( new PyFStringLiteralLexer(PyTokenTypes.FSTRING_TEXT), PyTokenTypes.FSTRING_TEXT ); ret.registerLayer( new PyFStringLiteralLexer(PyTokenTypes.FSTRING_RAW_TEXT), PyTokenTypes.FSTRING_RAW_TEXT ); return ret; }