mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-29 10:42:44 +02:00
* Allow dots
git-svn-id: branches/fixes_3_2@46633 -
This commit is contained in:
parent
d2f17d5a30
commit
befb0ada55
@ -443,7 +443,7 @@ Resourcestring
|
||||
|
||||
Function MakeIdentifier (S : String) : String;
|
||||
Function CreateString(S : String) : String;
|
||||
Procedure CheckIdentifier(AValue : String; AllowEmpty : Boolean = True);
|
||||
Procedure CheckIdentifier(AValue : String; AllowEmpty : Boolean = True; AllowDots : Boolean = False);
|
||||
|
||||
implementation
|
||||
|
||||
@ -454,10 +454,10 @@ begin
|
||||
Result:=''''+Result+'''';
|
||||
end;
|
||||
|
||||
Procedure CheckIdentifier(AValue : String; AllowEmpty : Boolean = True);
|
||||
Procedure CheckIdentifier(AValue : String; AllowEmpty : Boolean = True; AllowDots : Boolean = False);
|
||||
|
||||
begin
|
||||
If ((AValue='') and Not AllowEmpty) or Not IsValidIdent(AValue) then
|
||||
If ((AValue='') and Not AllowEmpty) or Not IsValidIdent(AValue,AllowDots) then
|
||||
Raise ECodeGenerator.CreateFmt(SErrInvalidIdentifier,[AValue]);
|
||||
end;
|
||||
|
||||
@ -1686,7 +1686,7 @@ end;
|
||||
procedure TCodeGeneratorOptions.SetUnitname(const AValue: String);
|
||||
begin
|
||||
if FUnitName=AValue then exit;
|
||||
CheckIdentifier(AValue,False);
|
||||
CheckIdentifier(AValue,False,True);
|
||||
FUnitName:=AValue;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user