Lexer () { Lexer customFileTypeLexer = new CustomFileTypeLexer(myTable, true); if (myTable.isHasStringEscapes()) { customFileTypeLexer = new LayeredLexer(customFileTypeLexer); ((LayeredLexer)customFileTypeLexer).registerSelfStoppingLayer(new StringLiteralLexer('\"', CustomHighlighterTokenType.STRING,true,"x"), new IElementType[]{CustomHighlighterTokenType.STRING}, IElementType.EMPTY_ARRAY); ((LayeredLexer)customFileTypeLexer).registerSelfStoppingLayer(new StringLiteralLexer('\'', CustomHighlighterTokenType.STRING,true,"x"), new IElementType[]{CustomHighlighterTokenType.SINGLE_QUOTED_STRING}, IElementType.EMPTY_ARRAY); } return customFileTypeLexer; }