|
@@ -593,13 +593,9 @@ begin
|
|
if sc.token = weElem then sc.Next;
|
|
if sc.token = weElem then sc.Next;
|
|
|
|
|
|
if parseIdOffset then begin
|
|
if parseIdOffset then begin
|
|
- if sc.token<>weIdent then
|
|
|
|
- ErrorExpectButFound(sc, 'identifier');
|
|
|
|
-
|
|
|
|
- dst.tableIdx := sc.resInt32;
|
|
|
|
- sc.Next;
|
|
|
|
-
|
|
|
|
|
|
+ ParseId(sc, dst.tableId);
|
|
if (sc.token = weOpenBrace) then begin
|
|
if (sc.token = weOpenBrace) then begin
|
|
|
|
+ sc.Next;
|
|
ParseInstrList(sc, dst.AddOffset);
|
|
ParseInstrList(sc, dst.AddOffset);
|
|
ConsumeToken(sc, weCloseBrace);
|
|
ConsumeToken(sc, weCloseBrace);
|
|
end;
|
|
end;
|
|
@@ -679,6 +675,7 @@ var
|
|
imp : TWasmImport;
|
|
imp : TWasmImport;
|
|
m : TWasmMemory;
|
|
m : TWasmMemory;
|
|
g : TWasmGlobal;
|
|
g : TWasmGlobal;
|
|
|
|
+ e : TWasmElement;
|
|
begin
|
|
begin
|
|
if not ConsumeOpenToken(sc, weModule) then
|
|
if not ConsumeOpenToken(sc, weModule) then
|
|
ErrorExpectButFound(sc, 'module');
|
|
ErrorExpectButFound(sc, 'module');
|
|
@@ -732,6 +729,11 @@ begin
|
|
symlist.Clear;
|
|
symlist.Clear;
|
|
ParseGlobal(sc, g);
|
|
ParseGlobal(sc, g);
|
|
end;
|
|
end;
|
|
|
|
+ weElem: begin
|
|
|
|
+ e:=dst.AddElement;
|
|
|
|
+ symlist.Clear;
|
|
|
|
+ ParseElem(sc, e, true);
|
|
|
|
+ end;
|
|
else
|
|
else
|
|
ErrorExpectButFound(sc, 'func', TokenStr[sc.token]);
|
|
ErrorExpectButFound(sc, 'func', TokenStr[sc.token]);
|
|
end;
|
|
end;
|