mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-30 07:40:27 +02:00
* nothingn has a complexity of 0
* stop complexity calculation if we get to the end of a series of a statements instead of crashing git-svn-id: trunk@6830 -
This commit is contained in:
parent
44752f5559
commit
cb16e8d3d0
@ -555,7 +555,7 @@ implementation
|
|||||||
function node_complexity(p: tnode): cardinal;
|
function node_complexity(p: tnode): cardinal;
|
||||||
begin
|
begin
|
||||||
result := 0;
|
result := 0;
|
||||||
while true do
|
while assigned(p) do
|
||||||
begin
|
begin
|
||||||
case p.nodetype of
|
case p.nodetype of
|
||||||
temprefn,
|
temprefn,
|
||||||
@ -639,6 +639,7 @@ implementation
|
|||||||
tempdeleten,
|
tempdeleten,
|
||||||
ordconstn,
|
ordconstn,
|
||||||
pointerconstn,
|
pointerconstn,
|
||||||
|
nothingn,
|
||||||
niln:
|
niln:
|
||||||
exit;
|
exit;
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user