mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 22:19:20 +02:00
codetools: clean up
git-svn-id: trunk@41884 -
This commit is contained in:
parent
65c8f9b6ed
commit
f7a0b09e98
@ -788,7 +788,7 @@ procedure TCustomCodeTool.AtomIsIdentifierSaveE;
|
|||||||
|
|
||||||
procedure SaveRaiseIdentExpectedButEOFFound;
|
procedure SaveRaiseIdentExpectedButEOFFound;
|
||||||
begin
|
begin
|
||||||
SaveRaiseExceptionFmt(ctsIdentExpectedButEOFFound,[GetAtom],true);
|
SaveRaiseExceptionFmt(ctsIdentExpectedButEOFFound,[GetAtom]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
@ -806,14 +806,14 @@ function TCustomCodeTool.AtomIsCustomOperator(AllowIdentifier,
|
|||||||
begin
|
begin
|
||||||
if CurPos.StartPos>SrcLen then begin
|
if CurPos.StartPos>SrcLen then begin
|
||||||
if SaveE then
|
if SaveE then
|
||||||
SaveRaiseException(ctsOperatorExpectedButEOFFound,true)
|
SaveRaiseException(ctsOperatorExpectedButEOFFound)
|
||||||
else
|
else
|
||||||
RaiseException(ctsOperatorExpectedButEOFFound,true)
|
RaiseException(ctsOperatorExpectedButEOFFound)
|
||||||
end else begin
|
end else begin
|
||||||
if SaveE then
|
if SaveE then
|
||||||
SaveRaiseExceptionFmt(ctsOperatorExpectedButAtomFound,[GetAtom],true)
|
SaveRaiseExceptionFmt(ctsOperatorExpectedButAtomFound,[GetAtom])
|
||||||
else
|
else
|
||||||
RaiseExceptionFmt(ctsOperatorExpectedButAtomFound,[GetAtom],true)
|
RaiseExceptionFmt(ctsOperatorExpectedButAtomFound,[GetAtom])
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1935,9 +1935,9 @@ var OpenBracket, AntiOpenBracket: TCommonAtomFlag;
|
|||||||
procedure RaiseBracketNotFound;
|
procedure RaiseBracketNotFound;
|
||||||
begin
|
begin
|
||||||
if OpenBracket=cafRoundBracketOpen then
|
if OpenBracket=cafRoundBracketOpen then
|
||||||
SaveRaiseExceptionFmt(ctsBracketNotFound,['('],true)
|
SaveRaiseExceptionFmt(ctsBracketNotFound,['('])
|
||||||
else
|
else
|
||||||
SaveRaiseExceptionFmt(ctsBracketNotFound,['['],true);
|
SaveRaiseExceptionFmt(ctsBracketNotFound,['[']);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
@ -3090,20 +3090,20 @@ end;
|
|||||||
|
|
||||||
procedure TCustomCodeTool.SaveRaiseIdentExpectedButAtomFound;
|
procedure TCustomCodeTool.SaveRaiseIdentExpectedButAtomFound;
|
||||||
begin
|
begin
|
||||||
SaveRaiseExceptionFmt(ctsIdentExpectedButAtomFound,[GetAtom],true);
|
SaveRaiseExceptionFmt(ctsIdentExpectedButAtomFound,[GetAtom]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCustomCodeTool.SaveRaiseBracketOpenExpectedButAtomFound;
|
procedure TCustomCodeTool.SaveRaiseBracketOpenExpectedButAtomFound;
|
||||||
begin
|
begin
|
||||||
SaveRaiseExceptionFmt(ctsBracketOpenExpectedButAtomFound,[GetAtom],true);
|
SaveRaiseExceptionFmt(ctsBracketOpenExpectedButAtomFound,[GetAtom]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCustomCodeTool.SaveRaiseBracketCloseExpectedButAtomFound;
|
procedure TCustomCodeTool.SaveRaiseBracketCloseExpectedButAtomFound;
|
||||||
begin
|
begin
|
||||||
if CurPos.StartPos<SrcLen then
|
if CurPos.StartPos<SrcLen then
|
||||||
SaveRaiseExceptionFmt(ctsBracketCloseExpectedButAtomFound,[GetAtom],true)
|
SaveRaiseExceptionFmt(ctsBracketCloseExpectedButAtomFound,[GetAtom])
|
||||||
else
|
else
|
||||||
SaveRaiseExceptionFmt(ctsBracketNotFound,[],true)
|
SaveRaiseExceptionFmt(ctsBracketNotFound,[])
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCustomCodeTool.ActivateGlobalWriteLock;
|
procedure TCustomCodeTool.ActivateGlobalWriteLock;
|
||||||
|
@ -503,7 +503,7 @@ end;
|
|||||||
function TPascalParserTool.UnexpectedKeyWord: boolean;
|
function TPascalParserTool.UnexpectedKeyWord: boolean;
|
||||||
begin
|
begin
|
||||||
Result:=false;
|
Result:=false;
|
||||||
SaveRaiseExceptionFmt(ctsUnexpectedKeyword,[GetAtom],true);
|
SaveRaiseExceptionFmt(ctsUnexpectedKeyword,[GetAtom]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TPascalParserTool.EndOfSourceExpected: boolean;
|
function TPascalParserTool.EndOfSourceExpected: boolean;
|
||||||
@ -634,7 +634,7 @@ begin
|
|||||||
HasSourceType:=false;
|
HasSourceType:=false;
|
||||||
CurPos.EndPos:=CurPos.StartPos;
|
CurPos.EndPos:=CurPos.StartPos;
|
||||||
end else
|
end else
|
||||||
SaveRaiseExceptionFmt(ctsNoPascalCodeFound,[GetAtom],true);
|
SaveRaiseExceptionFmt(ctsNoPascalCodeFound,[GetAtom]);
|
||||||
end;
|
end;
|
||||||
if CurNode=nil then
|
if CurNode=nil then
|
||||||
CreateChildNode;
|
CreateChildNode;
|
||||||
@ -891,7 +891,7 @@ procedure TPascalParserTool.BuildSubTreeForBeginBlock(BeginNode: TCodeTreeNode);
|
|||||||
begin
|
begin
|
||||||
SaveRaiseException(
|
SaveRaiseException(
|
||||||
'TPascalParserTool.BuildSubTreeForBeginBlock: begin expected, but '
|
'TPascalParserTool.BuildSubTreeForBeginBlock: begin expected, but '
|
||||||
+GetAtom+' found',true);
|
+GetAtom+' found');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
|
Loading…
Reference in New Issue
Block a user