mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-16 09:10:42 +02:00
[PATCH 113/188] adding parsing a type block
From e335bce46dc54fdd2e9e36e57090f8cc86ebafca Mon Sep 17 00:00:00 2001 From: Dmitry Boyarintsev <skalogryz.lists@gmail.com> Date: Wed, 18 Mar 2020 13:15:31 -0400 git-svn-id: branches/wasm@46109 -
This commit is contained in:
parent
9cd530810b
commit
efc23d23fd
@ -261,7 +261,24 @@ begin
|
||||
|
||||
//ip2Leb, // memory arguments, ask for offset + align
|
||||
//ipTable, // a complex structure... used for br_table only
|
||||
//ipResType // result type used for blocks, such as If, block or loop
|
||||
ipResType: // result type used for blocks, such as If, block or loop
|
||||
begin
|
||||
if (sc.token = weOpenBrace) then begin
|
||||
ConsumeToken(sc, weOpenBrace);
|
||||
ConsumeToken(sc, weResult);
|
||||
case sc.token of
|
||||
wei32: ci.operandNum := valtype_i32;
|
||||
wei64: ci.operandNum := valtype_i64;
|
||||
wef32: ci.operandNum := valtype_f32;
|
||||
wef64: ci.operandNum := valtype_f64;
|
||||
else
|
||||
ErrorExpectButFound(sc, 'i32');
|
||||
end;
|
||||
sc.Next;
|
||||
ConsumeToken(sc, weCloseBrace);
|
||||
end else
|
||||
ci.operandNum := block_type; // no value type
|
||||
end;
|
||||
|
||||
end;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user