Skip to content

Commit

Permalink
Meta+LibWasm: Correctly parse the invokee name in toplevel invokes
Browse files Browse the repository at this point in the history
  • Loading branch information
alimpfard committed Jul 6, 2021
1 parent 0b08392 commit f5d4e26
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Meta/generate-libwasm-spec-test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]]
Expand Down

0 comments on commit f5d4e26

Please sign in to comment.