| 38 | class Generator { |
| 39 | |
| 40 | struct Tag { |
| 41 | std::string name; |
| 42 | std::string attributes; |
| 43 | int pos; |
| 44 | int len; |
| 45 | bool operator<(const Tag &other) const { |
| 46 | //This is the order of the opening tag. Order first by position, then by length |
| 47 | // (in the reverse order) with the exception of length of 0 which always goes first. |
| 48 | // Ordered first by position, and then by lenth (reverse order) |
| 49 | return (pos != other.pos) ? pos < other.pos |
| 50 | : len == 0 || (other.len != 0 && len > other.len); |
| 51 | } |
| 52 | bool operator==(const Tag &other) const { |
| 53 | return std::tie(pos, len, name, attributes) == |
| 54 | std::tie(other.pos, other.len, other.name, other.attributes); |
| 55 | } |
| 56 | void open(llvm::raw_ostream& myfile) const; |
| 57 | void close(llvm::raw_ostream& myfile) const; |
| 58 | }; |
| 59 | |
| 60 | std::multiset<Tag> tags; |
| 61 |
nothing calls this directly
no outgoing calls
no test coverage detected