diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2015-04-08 23:49:42 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2015-04-08 23:49:42 +0200 |
commit | 9c990ae801b949de2728bfff4258aa90f9c96a52 (patch) | |
tree | ba2742dc1b3ef0b9898e20a6162e54fb58f440e2 /src/parser_state.hpp | |
parent | 7b8ebfcef1dada98ff36aeb4d16cd3c06517e879 (diff) | |
download | solar-9c990ae801b949de2728bfff4258aa90f9c96a52.tar solar-9c990ae801b949de2728bfff4258aa90f9c96a52.zip |
Allow adding source blocks to the top the of header and source files
Diffstat (limited to 'src/parser_state.hpp')
-rw-r--r-- | src/parser_state.hpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/parser_state.hpp b/src/parser_state.hpp index 882fec2..b183898 100644 --- a/src/parser_state.hpp +++ b/src/parser_state.hpp @@ -44,6 +44,9 @@ private: std::string current_var; std::string current_type; + std::string header_block; + std::string source_block; + public: parser_state_t() : current("") {} @@ -59,6 +62,22 @@ public: return term_types; } + const std::string & get_header_block() const { + return header_block; + } + + void set_header_block(const char *value) { + header_block = value; + } + + const std::string & get_source_block() const { + return source_block; + } + + void set_source_block(const char *value) { + source_block = value; + } + void new_rule(const char *nonterm); void add_rule_nonterminal(const char *nonterm); void add_rule_terminal(const char *term); |