[PATCH 137/188] parsing anonymous local variables declaration

From 59d381d7192f2953e268da6a21b3c9107631638d Mon Sep 17 00:00:00 2001
From: Dmitry Boyarintsev <skalogryz.lists@gmail.com>
Date: Wed, 25 Mar 2020 10:17:15 -0400

git-svn-id: branches/wasm@46133 -
This commit is contained in:
nickysn 2020-08-03 13:01:31 +00:00
parent b7978044ff
commit afb9a8008e

View File

@ -348,13 +348,24 @@ begin
ConsumeAnyOpenToken(sc, tk);
if tk in [weType, weParam, weResult] then
if tk in [weType, weParam, weResult] then begin
ParseTypeUse(sc, dst.functype, true);
ConsumeAnyOpenToken(sc, tk);
end;
while tk = weLocal do begin
p:=dst.AddLocal;
sc.Next;
ParseParam(sc, p.id, p.tp);
ParseParam(sc, p.id, p.tp, true, false);
if p.id = '' then begin
while sc.token in WasmTypeTokens do begin
p:=dst.AddLocal;
TokenTypeToValType(sc.token, p.tp);
sc.Next;
end;
end;
if sc.token=weCloseBrace then sc.Next;
ConsumeAnyOpenToken(sc, tk);
end;