ladybird/Userland/Libraries/LibMarkdown/Visitor.h
Linus Groh 6e19ab2bbc AK+Everywhere: Rename String to DeprecatedString
We have a new, improved string type coming up in AK (OOM aware, no null
state), and while it's going to use UTF-8, the name UTF8String is a
mouthful - so let's free up the String name by renaming the existing
class.
Making the old one have an annoying name will hopefully also help with
quick adoption :^)
2022-12-06 08:54:33 +01:00

54 lines
2.5 KiB
C++

/*
* Copyright (c) 2021, Ben Wiederhake <BenWiederhake.GitHub@gmx.de>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/RecursionDecision.h>
#include <LibMarkdown/BlockQuote.h>
#include <LibMarkdown/CodeBlock.h>
#include <LibMarkdown/CommentBlock.h>
#include <LibMarkdown/Document.h>
#include <LibMarkdown/Heading.h>
#include <LibMarkdown/HorizontalRule.h>
#include <LibMarkdown/List.h>
#include <LibMarkdown/Paragraph.h>
#include <LibMarkdown/Table.h>
namespace Markdown {
class Visitor {
public:
Visitor() = default;
virtual ~Visitor() = default;
virtual RecursionDecision visit(Document const&) { return RecursionDecision::Recurse; }
virtual RecursionDecision visit(BlockQuote const&) { return RecursionDecision::Recurse; }
virtual RecursionDecision visit(CodeBlock const&) { return RecursionDecision::Recurse; }
virtual RecursionDecision visit(CommentBlock const&) { return RecursionDecision::Recurse; }
virtual RecursionDecision visit(ContainerBlock const&) { return RecursionDecision::Recurse; }
virtual RecursionDecision visit(Heading const&) { return RecursionDecision::Recurse; }
virtual RecursionDecision visit(HorizontalRule const&) { return RecursionDecision::Recurse; }
virtual RecursionDecision visit(List const&) { return RecursionDecision::Recurse; }
virtual RecursionDecision visit(Paragraph const&) { return RecursionDecision::Recurse; }
virtual RecursionDecision visit(Table const&) { return RecursionDecision::Recurse; }
virtual RecursionDecision visit(Table::Column const&) { return RecursionDecision::Recurse; }
virtual RecursionDecision visit(Text const&) { return RecursionDecision::Recurse; }
virtual RecursionDecision visit(Text::BreakNode const&) { return RecursionDecision::Recurse; }
virtual RecursionDecision visit(Text::CodeNode const&) { return RecursionDecision::Recurse; }
virtual RecursionDecision visit(Text::EmphasisNode const&) { return RecursionDecision::Recurse; }
virtual RecursionDecision visit(Text::LinkNode const&) { return RecursionDecision::Recurse; }
virtual RecursionDecision visit(Text::MultiNode const&) { return RecursionDecision::Recurse; }
virtual RecursionDecision visit(Text::StrikeThroughNode const&) { return RecursionDecision::Recurse; }
virtual RecursionDecision visit(Text::TextNode const&) { return RecursionDecision::Recurse; }
virtual RecursionDecision visit(DeprecatedString const&) { return RecursionDecision::Recurse; }
};
}