mirror of https://gitlab.com/basile.b/dexed.git
simplified line nbr parser
This commit is contained in:
parent
ba739df7c2
commit
d0ed450c53
|
@ -724,41 +724,28 @@ begin
|
||||||
while (true) do
|
while (true) do
|
||||||
begin
|
begin
|
||||||
if i > length(aMessage) then exit;
|
if i > length(aMessage) then exit;
|
||||||
if aMessage[i] = '.' then
|
if aMessage[i] = '(' then
|
||||||
begin
|
begin
|
||||||
inc(i);
|
inc(i);
|
||||||
if i > length(aMessage) then exit;
|
if i > length(aMessage) then exit;
|
||||||
if aMessage[i] = 'd' then
|
while( isNumber(aMessage[i]) or (aMessage[i] = ',') or (aMessage[i] = ':')) do
|
||||||
begin
|
begin
|
||||||
|
ident += aMessage[i];
|
||||||
inc(i);
|
inc(i);
|
||||||
if i > length(aMessage) then exit;
|
if i > length(aMessage) then exit;
|
||||||
if aMessage[i] = 'i' then
|
end;
|
||||||
inc(i);
|
if aMessage[i] = ')' then
|
||||||
if i > length(aMessage) then exit;
|
begin
|
||||||
if aMessage[i] = '(' then
|
j := Pos(',', ident);
|
||||||
|
if j = 0 then j := Pos(':', ident);
|
||||||
|
if j = 0 then
|
||||||
|
result.y := strToIntDef(ident, -1)
|
||||||
|
else
|
||||||
begin
|
begin
|
||||||
inc(i);
|
result.y := strToIntDef(ident[1..j-1], -1);
|
||||||
if i > length(aMessage) then exit;
|
result.x := strToIntDef(ident[j+1..length(ident)], -1);
|
||||||
while( isNumber(aMessage[i]) or (aMessage[i] = ',') or (aMessage[i] = ':')) do
|
|
||||||
begin
|
|
||||||
ident += aMessage[i];
|
|
||||||
inc(i);
|
|
||||||
if i > length(aMessage) then exit;
|
|
||||||
end;
|
|
||||||
if aMessage[i] = ')' then
|
|
||||||
begin
|
|
||||||
j := Pos(',', ident);
|
|
||||||
if j = 0 then j := Pos(':', ident);
|
|
||||||
if j = 0 then
|
|
||||||
result.y := strToIntDef(ident, -1)
|
|
||||||
else
|
|
||||||
begin
|
|
||||||
result.y := strToIntDef(ident[1..j-1], -1);
|
|
||||||
result.x := strToIntDef(ident[j+1..length(ident)], -1);
|
|
||||||
end;
|
|
||||||
exit;
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
|
exit;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
inc(i);
|
inc(i);
|
||||||
|
|
Loading…
Reference in New Issue