summaryrefslogtreecommitdiff
path: root/src/wasm-s-parser.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm-s-parser.h')
-rw-r--r--src/wasm-s-parser.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/wasm-s-parser.h b/src/wasm-s-parser.h
index a914b6598..6e0eda826 100644
--- a/src/wasm-s-parser.h
+++ b/src/wasm-s-parser.h
@@ -1287,16 +1287,20 @@ private:
auto ret = allocator.alloc<Loop>();
size_t i = 1;
Name out;
- if (s.size() > i + 1 && s[i]->isStr() && s[i + 1]->isStr()) { // out can only be named if both are
+ if (s.size() > i + 1 && s[i]->dollared() && s[i + 1]->dollared()) { // out can only be named if both are
out = s[i]->str();
i++;
}
- if (s.size() > i && s[i]->isStr()) {
+ if (s.size() > i && s[i]->dollared()) {
ret->name = s[i]->str();
i++;
} else {
ret->name = getPrefixedName("loop-in");
}
+ if (i < s.size() && s[i]->isStr()) {
+ // block signature
+ i++; // TODO: parse the signature
+ }
labelStack.push_back(ret->name);
ret->body = makeMaybeBlock(s, i);
labelStack.pop_back();