summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/corelib/gdi/fpg_gdi.pas20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/corelib/gdi/fpg_gdi.pas b/src/corelib/gdi/fpg_gdi.pas
index b24b04be..a1d314f6 100644
--- a/src/corelib/gdi/fpg_gdi.pas
+++ b/src/corelib/gdi/fpg_gdi.pas
@@ -2621,13 +2621,31 @@ var
Result := c;
end;
+ function LookAhead: char;
+ var
+ i: integer;
+ lc: char;
+ begin
+ i := cp+1;
+ if i > length(desc) then
+ lc := #0
+ else
+ lc := desc[i];
+ result := lc;
+ end;
+
procedure NextToken;
begin
token := '';
- while (c <> #0) and (c in [' ', 'a'..'z', 'A'..'Z', '_', '0'..'9']) do
+ while (c <> #0) and (c in [' ', 'a'..'z', 'A'..'Z', '_', '@', '0'..'9']) do
begin
token := token + c;
NextC;
+ if (c = '-') and (LookAhead in [' ', 'a'..'z', 'A'..'Z', '_']) then
+ begin
+ token := token + c;
+ NextC;
+ end;
end;
end;