summaryrefslogtreecommitdiffstats
path: root/src/generator.cpp
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2015-04-08 23:49:42 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2015-04-08 23:49:42 +0200
commit9c990ae801b949de2728bfff4258aa90f9c96a52 (patch)
treeba2742dc1b3ef0b9898e20a6162e54fb58f440e2 /src/generator.cpp
parent7b8ebfcef1dada98ff36aeb4d16cd3c06517e879 (diff)
downloadsolar-9c990ae801b949de2728bfff4258aa90f9c96a52.tar
solar-9c990ae801b949de2728bfff4258aa90f9c96a52.zip
Allow adding source blocks to the top the of header and source files
Diffstat (limited to 'src/generator.cpp')
-rw-r--r--src/generator.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/generator.cpp b/src/generator.cpp
index 9350f40..31dac2a 100644
--- a/src/generator.cpp
+++ b/src/generator.cpp
@@ -119,8 +119,10 @@ void generator_t::generate_itemsets() {
generator_t::generator_t(const std::vector<std::tuple<item_t, std::vector<std::string>, std::string>> &rules0,
const std::map<std::string, std::string> &nonterm_types0,
- const std::map<symbol_t, std::pair<std::string, std::string>> &term_types0)
- : rules(rules0), nonterm_types(nonterm_types0), term_types(term_types0) {
+ const std::map<symbol_t, std::pair<std::string, std::string>> &term_types0,
+ const std::string &header_block0, const std::string &source_block0)
+ : rules(rules0), nonterm_types(nonterm_types0), term_types(term_types0),
+ header_block(header_block0), source_block(source_block0) {
for (size_t i = 0; i < rules.size(); i++) {
item_t rule = std::get<0>(rules[i]);