optimizations
This commit is contained in:
parent
bb21e64a51
commit
48fbaeb3c9
5 changed files with 49 additions and 37 deletions
|
@ -13,19 +13,18 @@ namespace mstch {
|
|||
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:
|
||||
enum class parse_state { prews, postws, content };
|
||||
type type_val;
|
||||
std::string content_val;
|
||||
std::string raw_val;
|
||||
bool eol;
|
||||
bool ws_only;
|
||||
bool marked;
|
||||
std::tuple<int,int,type> token_info(const std::string& inside);
|
||||
type token_info(char c);
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue