optimizations
This commit is contained in:
parent
e10e9b6d86
commit
bb21e64a51
11 changed files with 88 additions and 108 deletions
|
@ -10,16 +10,21 @@ namespace mstch {
|
|||
text, variable, section_open, section_close, inverted_section_open,
|
||||
unescaped_variable, comment, partial
|
||||
};
|
||||
token(bool is_tag_val, const std::string& raw_val);
|
||||
type token_type() const;
|
||||
std::string content() const;
|
||||
std::string raw() const;
|
||||
bool is_tag() const;
|
||||
token(bool is_tag, bool eol, bool ws_only, const std::string& raw_val);
|
||||
type token_type() const { return type_val; };
|
||||
const std::string& content() const { return content_val; };
|
||||
const std::string& raw() const { return raw_val; };
|
||||
bool is_eol() const { return eol; }
|
||||
bool is_ws_only() const { return ws_only; }
|
||||
bool is_marked() const { return marked; }
|
||||
void mark() { marked = true; };
|
||||
private:
|
||||
type type_val;
|
||||
std::string content_val;
|
||||
std::string raw_val;
|
||||
bool is_tag_val;
|
||||
bool eol;
|
||||
bool ws_only;
|
||||
bool marked;
|
||||
std::tuple<int,int,type> token_info(const std::string& inside);
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue