diff options
author | Aleksey Veresov <aleksey@veresov.pro> | 2019-11-08 19:49:40 +0300 |
---|---|---|
committer | Aleksey Veresov <aleksey@veresov.pro> | 2019-11-08 19:49:40 +0300 |
commit | ed7a63015c1583d5544ac18bbaccaedc95f3e5e3 (patch) | |
tree | 9648d5a74bae9cbd90670a8bfa0af47189e4536f /src/plain.hpp | |
parent | c6419eed96f2832b1de2b94d711552efaa9b172d (diff) | |
download | texo-ed7a63015c1583d5544ac18bbaccaedc95f3e5e3.tar texo-ed7a63015c1583d5544ac18bbaccaedc95f3e5e3.tar.xz texo-ed7a63015c1583d5544ac18bbaccaedc95f3e5e3.zip |
[texo] Full rewrite of inner representation.
Diffstat (limited to 'src/plain.hpp')
-rw-r--r-- | src/plain.hpp | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/src/plain.hpp b/src/plain.hpp index 13a2c0c..66ee5f1 100644 --- a/src/plain.hpp +++ b/src/plain.hpp @@ -6,18 +6,21 @@ #include "importer.hpp" +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Texo Plain Producer + */ class TexoProducerPlain: public TexoProducer { public: TexoProducerPlain(TexoExporter &exporter); - void End(); + bool End(); - void Put(const Texo &piece); + bool Put(char c); - void Put(const TexoParagraph &piece); - void Put(const TexoQuote &piece); + bool Paragraph(); + bool Quote(); - void Put(const TexoHorizontalRule &piece); + bool PutHorizontalRule(); private: bool quoted; @@ -26,15 +29,20 @@ private: }; +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Texo Plain Importer + */ class TexoImporterPlain: public TexoImporter { public: TexoImporterPlain(TexoProducer &producer); - void End(); - void Put(char c); - void Put(const ScriptVariable &str); - void Put(FILE *file); +protected: + bool TrueEnd(); + + + bool TruePut(char c); + private: enum State { |