MXVM 1.8.1
Virtual Machine, Compiler, and Pascal Frontend
Loading...
Searching...
No Matches
html_gen.hpp
Go to the documentation of this file.
1
6#ifndef __HTML__GEN___H_
7#define __HTML__GEN___H_
8
9#include <iosfwd>
10#include <string>
11
12namespace mxvm {
13
15 class HTMLGen {
16 public:
21 HTMLGen(const std::string &src);
22
28 void output(std::ostream &out, std::string filename);
29
30 private:
31 std::string source;
32 };
33
46 class PasHTMLGen {
47 public:
49 explicit PasHTMLGen(const std::string &src);
50
57 void output(std::ostream &out, const std::string &filename,
58 const std::string &cssHref = "mxvm-highlight.css");
59
67 static std::string defaultCss();
68
69 private:
70 std::string source;
71 };
72} // namespace mxvm
73
74#endif
void output(std::ostream &out, std::string filename)
Write the generated HTML to an output stream.
Definition html_gen.cpp:86
HTMLGen(const std::string &src)
Construct an HTML generator from MXVM source text.
Definition html_gen.cpp:84
std::string source
the MXVM source text to convert
Definition html_gen.hpp:31
std::string source
Definition html_gen.hpp:70
PasHTMLGen(const std::string &src)
Construct from Pascal source text.
Definition html_gen.cpp:324
void output(std::ostream &out, const std::string &filename, const std::string &cssHref="mxvm-highlight.css")
Write generated HTML to an output stream.
Definition html_gen.cpp:378
static std::string defaultCss()
Return the default stylesheet text.
Definition html_gen.cpp:326
Definition ast.hpp:14