* consolidated code

This commit is contained in:
florian 2024-10-21 23:04:25 +02:00
parent d01efd153c
commit a9f522c29d

View File

@ -2294,6 +2294,8 @@ type
begin begin
try_consume_nestedsym(srsym,srsymtable); try_consume_nestedsym(srsym,srsymtable);
if assigned(srsym) then if assigned(srsym) then
begin
MarkSymbolAsUsed(srsym);
case srsym.typ of case srsym.typ of
constsym: constsym:
begin begin
@ -2312,7 +2314,6 @@ type
begin begin
result.free; result.free;
result:=texprvalue.create_const(tconstsym(srsym)); result:=texprvalue.create_const(tconstsym(srsym));
MarkSymbolAsUsed(tconstsym(srsym));
end; end;
end; end;
enumsym: enumsym:
@ -2331,11 +2332,11 @@ type
begin begin
result.free; result.free;
result:=texprvalue.create_int(tenumsym(srsym).value); result:=texprvalue.create_int(tenumsym(srsym).value);
MarkSymbolAsUsed(tenumsym(srsym));
end; end;
end; end;
else else
MarkSymbolAsUsed(tconstsym(srsym)); ;
end;
end; end;
end end
{ the id must be belong to the set type } { the id must be belong to the set type }