codetools: fixed parsing parameter modifier location on m68k and powerpc, bug #29350

git-svn-id: branches/fixes_1_6@51314 -
This commit is contained in:
mattias 2016-01-18 16:20:43 +00:00
parent 0779740372
commit bebbb5aa73

View File

@ -1502,6 +1502,8 @@ end;
function TPascalParserTool.ReadParamType(ExceptionOnError, Extract: boolean; function TPascalParserTool.ReadParamType(ExceptionOnError, Extract: boolean;
const Attr: TProcHeadAttributes): boolean; const Attr: TProcHeadAttributes): boolean;
// after reading, CurPos is the atom after the type // after reading, CurPos is the atom after the type
// Examples:
// Domain: LongInt location 'd0' (only m68k, powerpc)
var var
copying: boolean; copying: boolean;
IsArrayType: Boolean; IsArrayType: Boolean;
@ -1602,7 +1604,16 @@ begin
else exit; else exit;
end; end;
if AtomIsChar('<') then if AtomIsChar('<') then
ReadGenericParam; ReadGenericParam
else if UpAtomIs('LOCATION')
and (Scanner.Values.IsDefined('CPUM68K') or Scanner.Values.IsDefined('CPUPOWERPC'))
then begin
// for example Domain: LongInt location 'd0'
ReadNextAtom;
if not AtomIsStringConstant then
SaveRaiseStringExpectedButAtomFound(ctsStringConstant);
ReadNextAtom;
end;
Result:=true; Result:=true;
end; end;