@Override
    public Scanner scan(Lexer lexer) {
        loop:
        while (true) {
            if (lexer.hasNext()) {
                final char ch = lexer.next();
                switch (ch) {
                    case '\\':
                        if (lexer.hasNext()) {
                            final char chn = lexer.next();
                            if (chn != '\n') {
                                break;
                            }
                        }
                    case '\n':
                        return error(lexer);
                    case '\'':
                        break loop;
                }
            } else {
                return error(lexer);
            }
        }

        lexer.emit(TokenType.CHAR_CONSTANT);

        return new InsideActionScanner();
    }