summaryrefslogtreecommitdiff
path: root/src/parsing.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/parsing.h')
-rw-r--r--src/parsing.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/parsing.h b/src/parsing.h
index d4df3c1c2..be3c112f3 100644
--- a/src/parsing.h
+++ b/src/parsing.h
@@ -193,6 +193,25 @@ struct ParseException {
}
};
+struct MapParseException {
+ std::string text;
+
+ MapParseException() : text("unknown parse error") {}
+ MapParseException(std::string text) : text(text) {}
+
+ void dump(std::ostream& o) {
+ Colors::magenta(o);
+ o << "[";
+ Colors::red(o);
+ o << "map parse exception: ";
+ Colors::green(o);
+ o << text;
+ Colors::magenta(o);
+ o << "]";
+ Colors::normal(o);
+ }
+};
+
// Helper for parsers that may not have unique label names. This transforms
// the names into unique ones, as required by Binaryen IR.
struct UniqueNameMapper {