Lexer () { LayeredLexer layeredLexer = new LayeredLexer(getLexer()); boolean isPermissiveDialect = isPermissiveDialect(); layeredLexer.registerSelfStoppingLayer(new StringLiteralLexer('\"', JsonElementTypes.DOUBLE_QUOTED_STRING, isCanEscapeEol(), isPermissiveDialect ? PERMISSIVE_ESCAPES : "/", false, isPermissiveDialect) { @Override protected @NotNull IElementType handleSingleSlashEscapeSequence() { return isPermissiveDialect ? myOriginalLiteralToken : super.handleSingleSlashEscapeSequence(); } @Override protected boolean shouldAllowSlashZero() { return isPermissiveDialect; } }, new IElementType[]{JsonElementTypes.DOUBLE_QUOTED_STRING}, IElementType.EMPTY_ARRAY); layeredLexer.registerSelfStoppingLayer(new StringLiteralLexer('\'', JsonElementTypes.SINGLE_QUOTED_STRING, isCanEscapeEol(), isPermissiveDialect ? PERMISSIVE_ESCAPES : "/", false, isPermissiveDialect){ @Override protected @NotNull IElementType handleSingleSlashEscapeSequence() { return isPermissiveDialect ? myOriginalLiteralToken : super.handleSingleSlashEscapeSequence(); } @Override protected boolean shouldAllowSlashZero() { return isPermissiveDialect; } }, new IElementType[]{JsonElementTypes.SINGLE_QUOTED_STRING}, IElementType.EMPTY_ARRAY); return layeredLexer; }