[PATCH 127/188] updating parsing of multiple parameters

From 4c3f1e9b8facadaca9aff02e64679f94f3ff4ecc Mon Sep 17 00:00:00 2001
From: Dmitry Boyarintsev <skalogryz.lists@gmail.com>
Date: Mon, 23 Mar 2020 16:39:54 -0400

git-svn-id: branches/wasm@46123 -
This commit is contained in:
nickysn 2020-08-03 13:01:20 +00:00
parent 0ff587582b
commit 6419413641

View File

@ -216,7 +216,21 @@ begin
while tk = weParam do begin
p:=dst.AddParam;
sc.Next;
ParseParam(sc, p.id, p.tp);
ParseParam(sc, p.id, p.tp, true, false);
// Text format specification:
// Abbreviations
// Multiple anonymous parameters or results may be combined into a single declaration
if (p.id = '') and (sc.token in [wei32, wei64, wef32, wef64]) then begin
while (sc.token in [wei32, wei64, wef32, wef64]) do begin
p:=dst.AddParam;
TokenTypeToValType(sc.token, p.tp);
sc.Next;
end;
end;
ConsumeToken(sc, weCloseBrace);
ConsumeAnyOpenToken(sc, tk);
end;