summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Meta/generate-libwasm-spec-test.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Meta/generate-libwasm-spec-test.py b/Meta/generate-libwasm-spec-test.py
index e06737aaf7..4f894dfe06 100644
--- a/Meta/generate-libwasm-spec-test.py
+++ b/Meta/generate-libwasm-spec-test.py
@@ -188,8 +188,10 @@ def generate(ast):
elif len(entry) >= 2 and entry[0][0] == 'invoke':
# toplevel invoke :shrug:
arg, name, module = 0, None, None
- if isinstance(entry[1][1], str):
+ if not isinstance(entry[1], str) and isinstance(entry[1][1], str):
name = entry[1][1]
+ elif isinstance(entry[1], str):
+ name = entry[1]
else:
name = entry[1][2]
module = named_modules[entry[1][1][0]]