codetools: removed cafRecord

git-svn-id: trunk@28518 -
This commit is contained in:
mattias 2010-11-28 09:33:08 +00:00
parent e051968939
commit 3973fe6595
3 changed files with 12 additions and 26 deletions

View File

@ -59,18 +59,18 @@ type
cafSemicolon, cafEqual, cafColon, cafComma, cafPoint,
cafRoundBracketOpen, cafRoundBracketClose,
cafEdgedBracketOpen, cafEdgedBracketClose,
cafWord, cafEnd, cafRecord
cafWord, cafEnd
);
const
CleanCodeXYPosition: TCodeXYPosition = (X:0; Y:0; Code:nil);
AllCommonAtomWords = [cafWord, cafEnd, cafRecord];
AllCommonAtomWords = [cafWord, cafEnd];
CommonAtomFlagNames: array[TCommonAtomFlag] of shortstring = (
'None',
'Semicolon', 'Equal', 'Colon', 'Comma', 'Point',
'RoundBracketOpen', 'RoundBracketClose',
'EdgedBracketOpen', 'EdgedBracketClose',
'Word', 'End', 'Record'
'Word', 'End'
);
type

View File

@ -1055,11 +1055,6 @@ begin
and ((CurPos.StartPos=1) or (Src[CurPos.StartPos-1]<>'@'))
then
CurPos.Flag:=cafEnd;
'r','R':
if (CurPos.EndPos-CurPos.StartPos=6)
and UpAtomIs('RECORD')
then
CurPos.Flag:=cafRecord;
end;
end;
'''','#':
@ -1472,11 +1467,6 @@ begin
CurPos.Flag:=cafEnd
else
CurPos.Flag:=cafWord;
'R':
if CompareSrcIdentifiers(CurPos.StartPos,'RECORD') then
CurPos.Flag:=cafRecord
else
CurPos.Flag:=cafWord;
else
CurPos.Flag:=cafWord;
end;
@ -1588,9 +1578,6 @@ begin
'E':
if CompareSrcIdentifiers(CurPos.StartPos,'END') then
CurPos.Flag:=cafEnd;
'R':
if CompareSrcIdentifiers(CurPos.StartPos,'RECORD') then
CurPos.Flag:=cafRecord;
end;
end;
end;
@ -1676,7 +1663,7 @@ begin
ReadNextAtom;
if (CurPos.Flag=CloseBracket) then break;
if (CurPos.StartPos>SrcLen)
or (CurPos.Flag in [cafEnd,cafRecord,AntiCloseBracket])
or (CurPos.Flag in [cafEnd,AntiCloseBracket])
then begin
SetNiceErrorPos(Start.StartPos);
if ExceptionOnNotFound then begin

View File

@ -956,7 +956,7 @@ function TPascalParserTool.KeyWordFuncClassVarTypePacked: boolean;
// 'packed' record
begin
ReadNextAtom;
if CurPos.Flag=cafRECORD then
if UpAtomIs('RECORD') then
Result:=KeyWordFuncClassVarTypeRecord
else begin
RaiseStringExpectedButAtomFound('"record"');
@ -1000,7 +1000,7 @@ begin
Level:=1;
while (CurPos.StartPos<=SrcLen) and (Level>0) do begin
ReadNextAtom;
if CurPos.Flag=cafRECORD then inc(Level)
if UpAtomIs('RECORD') then inc(Level)
else if (CurPos.Flag=cafEND) then dec(Level);
end;
if CurPos.StartPos>SrcLen then
@ -2638,7 +2638,7 @@ begin
BlockType:=ebtCase
else if UpAtomIs('ASM') then
BlockType:=ebtAsm
else if CurPos.Flag=cafRECORD then
else if UpAtomIs('RECORD') then
BlockType:=ebtRecord
else
RaiseUnknownBlockType;
@ -2788,8 +2788,7 @@ begin
begin
if (CurPos.Flag=cafEND) or (UpAtomIs('UNTIL')) then begin
ReadBackTilBlockEnd(false);
end else if UpAtomIs('BEGIN') or (CurPos.Flag in [cafRECORD])
or UpAtomIs('ASM')
end else if UpAtomIs('BEGIN') or UpAtomIs('RECORD') or UpAtomIs('ASM')
then begin
if BlockType=ebtBegin then
break
@ -2827,7 +2826,7 @@ begin
begin
if UpAtomIs('CASE') then begin
// could be another variant record, -> read further ...
end else if CurPos.Flag=cafRECORD then begin
end else if UpAtomIs('RECORD') then begin
// record start found -> the case is a variant record
// block start found
break;
@ -3804,8 +3803,6 @@ begin
dec(Level);
if Level=0 then break;
end;
cafRECORD:
inc(Level);
cafRoundBracketOpen,cafEdgedBracketOpen:
inc(BracketLvl);
cafRoundBracketClose,cafEdgedBracketClose:
@ -3832,7 +3829,9 @@ begin
or CompareSrcIdentifiers(p,'IMPLEMENTATION') then
SaveRaiseException(ctsEndForClassNotFound);
'R':
if CompareSrcIdentifiers(p,'RESOURCESTRING') then
if CompareSrcIdentifiers(p,'RECORD') then
inc(Level)
else if CompareSrcIdentifiers(p,'RESOURCESTRING') then
SaveRaiseException(ctsEndForClassNotFound);
'T':
if CompareSrcIdentifiers(p,'THREADVAR') then