mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 07:39:25 +02:00
[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:
parent
b7978044ff
commit
afb9a8008e
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user