This repository has been archived on 2023-08-12. You can view files and clone it. You cannot open issues or pull requests or push a commit.
2017-10-11 09:48:27 -04:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <sstream>
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
|
|
#include "../template_type.hpp"
|
2017-10-17 10:29:56 -04:00
|
|
|
#include "render_state.hpp"
|
2017-10-11 09:48:27 -04:00
|
|
|
|
2017-10-17 10:29:56 -04:00
|
|
|
namespace mstch
|
|
|
|
|
{
|
2017-10-11 09:48:27 -04:00
|
|
|
|
2017-10-17 10:29:56 -04:00
|
|
|
class in_section : public render_state
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
enum class type
|
|
|
|
|
{
|
|
|
|
|
inverted,
|
|
|
|
|
normal
|
|
|
|
|
};
|
|
|
|
|
in_section(type type, const token &start_token);
|
|
|
|
|
std::string render(render_context &context, const token &token) override;
|
2017-10-11 09:48:27 -04:00
|
|
|
|
2017-10-17 10:29:56 -04:00
|
|
|
private:
|
2017-10-11 09:48:27 -04:00
|
|
|
const type m_type;
|
2017-10-17 10:29:56 -04:00
|
|
|
const token &m_start_token;
|
2017-10-11 09:48:27 -04:00
|
|
|
template_type m_section;
|
|
|
|
|
int m_skipped_openings;
|
|
|
|
|
};
|
|
|
|
|
}
|