diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/fpg_dialogs.pas | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/gui/fpg_dialogs.pas b/src/gui/fpg_dialogs.pas index 7cb1ee20..42f4752c 100644 --- a/src/gui/fpg_dialogs.pas +++ b/src/gui/fpg_dialogs.pas @@ -739,13 +739,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; |