summaryrefslogtreecommitdiff
path: root/src/wasm/wasm-s-parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm/wasm-s-parser.cpp')
-rw-r--r--src/wasm/wasm-s-parser.cpp22
1 files changed, 0 insertions, 22 deletions
diff --git a/src/wasm/wasm-s-parser.cpp b/src/wasm/wasm-s-parser.cpp
index c688630c3..8bedeab9f 100644
--- a/src/wasm/wasm-s-parser.cpp
+++ b/src/wasm/wasm-s-parser.cpp
@@ -3109,14 +3109,6 @@ void SExpressionWasmBuilder::parseImport(Element& s) {
}
} else if (kind == ExternalKind::Tag) {
auto tag = make_unique<Tag>();
- if (j >= inner.size()) {
- throw ParseException("tag does not have an attribute", s.line, s.col);
- }
- auto& attrElem = *inner[j++];
- if (!elementStartsWith(attrElem, ATTR) || attrElem.size() != 2) {
- throw ParseException("invalid attribute", attrElem.line, attrElem.col);
- }
- tag->attribute = atoi(attrElem[1]->c_str());
j = parseTypeUse(inner, j, tag->sig);
tag->setName(name, hasExplicitName);
tag->module = module;
@@ -3498,20 +3490,6 @@ void SExpressionWasmBuilder::parseTag(Element& s, bool preParseImport) {
ex->kind = ExternalKind::Tag;
}
- // Parse attribute
- if (i >= s.size()) {
- throw ParseException("tag does not have an attribute", s.line, s.col);
- }
- auto& attrElem = *s[i++];
- if (!elementStartsWith(attrElem, ATTR) || attrElem.size() != 2) {
- throw ParseException("invalid attribute", attrElem.line, attrElem.col);
- }
- if (!attrElem[1]->isStr()) {
- throw ParseException(
- "invalid attribute", attrElem[1]->line, attrElem[1]->col);
- }
- tag->attribute = atoi(attrElem[1]->c_str());
-
// Parse typeuse
i = parseTypeUse(s, i, tag->sig);