|
@@ -1393,6 +1393,11 @@ begin
|
|
Result:=true;
|
|
Result:=true;
|
|
PTM:=ptmVarargs;
|
|
PTM:=ptmVarargs;
|
|
end
|
|
end
|
|
|
|
+ else if CompareText(S,ProcTypeModifiers[ptmFar])=0 then
|
|
|
|
+ begin
|
|
|
|
+ Result:=true;
|
|
|
|
+ PTM:=ptmFar;
|
|
|
|
+ end
|
|
else if CompareText(S,ProcTypeModifiers[ptmStatic])=0 then
|
|
else if CompareText(S,ProcTypeModifiers[ptmStatic])=0 then
|
|
begin
|
|
begin
|
|
Result:=true;
|
|
Result:=true;
|
|
@@ -5383,8 +5388,8 @@ begin
|
|
begin
|
|
begin
|
|
if IsAnonymous then
|
|
if IsAnonymous then
|
|
CheckToken(tkbegin); // begin expected, but ; found
|
|
CheckToken(tkbegin); // begin expected, but ; found
|
|
- if LastToken=tkSemicolon then
|
|
|
|
- ParseExcSyntaxError;
|
|
|
|
|
|
+ // if LastToken=tkSemicolon then
|
|
|
|
+ // ParseExcSyntaxError;
|
|
continue;
|
|
continue;
|
|
end
|
|
end
|
|
else if TokenIsCallingConvention(CurTokenString,cc) then
|
|
else if TokenIsCallingConvention(CurTokenString,cc) then
|
|
@@ -5417,7 +5422,12 @@ begin
|
|
else if IsAnonymous and TokenIsAnonymousProcedureModifier(Parent,CurTokenString,PM) then
|
|
else if IsAnonymous and TokenIsAnonymousProcedureModifier(Parent,CurTokenString,PM) then
|
|
HandleProcedureModifier(Parent,PM)
|
|
HandleProcedureModifier(Parent,PM)
|
|
else if TokenIsProcedureTypeModifier(Parent,CurTokenString,PTM) then
|
|
else if TokenIsProcedureTypeModifier(Parent,CurTokenString,PTM) then
|
|
- HandleProcedureTypeModifier(Element,PTM)
|
|
|
|
|
|
+ begin
|
|
|
|
+ HandleProcedureTypeModifier(Element,PTM);
|
|
|
|
+ // Backwards compatibility
|
|
|
|
+ if (PTM=ptmFar) and (Parent is TPasProcedure) then
|
|
|
|
+ (Parent as TPasProcedure).AddModifier(pmFar)
|
|
|
|
+ end
|
|
else if (not IsProcType) and (not IsAnonymous)
|
|
else if (not IsProcType) and (not IsAnonymous)
|
|
and TokenIsProcedureModifier(Parent,CurTokenString,PM) then
|
|
and TokenIsProcedureModifier(Parent,CurTokenString,PM) then
|
|
HandleProcedureModifier(Parent,PM)
|
|
HandleProcedureModifier(Parent,PM)
|