From 2c12c0652d2b8c8440e1e908f004826840ed14ab Mon Sep 17 00:00:00 2001 From: Aleksey Veresov Date: Fri, 18 Oct 2019 17:33:06 +0300 Subject: [texo] Semi-working. --- src/plain.hpp | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) (limited to 'src/plain.hpp') diff --git a/src/plain.hpp b/src/plain.hpp index d1a9efb..6fa086f 100644 --- a/src/plain.hpp +++ b/src/plain.hpp @@ -4,18 +4,52 @@ #include "exporter.hpp" #include "producer.hpp" #include "importer.hpp" -#include "texo.hpp" class TexoProducerPlain: public TexoProducer { public: TexoProducerPlain(TexoExporter &exporter); + + void Put(const Texo &piece); + + void Put(const TexoHeader &piece); + void Put(const TexoParagraph &piece); + void Put(const TexoQuote &piece); + + void Put(const TexoLineBreak &piece); + void Put(const TexoHorizontalRule &piece); + +private: + bool quoted; }; class TexoImporterPlain: public TexoImporter { public: TexoImporterPlain(TexoProducer &producer); + ~TexoImporterPlain(); + + void Put(char c); + void Put(const ScriptVariable &str); + +private: + enum State { + text, + space, + newline, + paragraph, + quote, + quote_newline, + header + } state; + + void Text(char c); + void Space(char c); + void Newline(char c); + void Paragraph(char c); + void Quote(char c); + void QuoteNewline(char c); + void Header(char c); }; -- cgit v1.2.3