mirror of https://gitlab.com/basile.b/dexed.git
fixed possible crash in ce_staticexplorer
This commit is contained in:
parent
a7780320a0
commit
f7633760ea
|
@ -809,9 +809,11 @@ _preSeq:
|
||||||
if old1.data = tk.data then
|
if old1.data = tk.data then
|
||||||
addError('keyword is duplicated');
|
addError('keyword is duplicated');
|
||||||
|
|
||||||
|
(*
|
||||||
if (old1.kind = ltkOperator) and (tk.kind = ltkOperator) then
|
if (old1.kind = ltkOperator) and (tk.kind = ltkOperator) then
|
||||||
if not isPtrOperator(tk.data[1]) then // ident operator [&,*] ident
|
if not isPtrOperator(tk.data[1]) then // ident operator [&,*] ident
|
||||||
addError('operator rhs cannot be an operator');
|
addError('operator rhs cannot be an operator');
|
||||||
|
*)
|
||||||
|
|
||||||
if (old1.kind = ltkNumber) and (tk.kind = ltkNumber) then
|
if (old1.kind = ltkNumber) and (tk.kind = ltkNumber) then
|
||||||
addError('symbol or operator expected after number');
|
addError('symbol or operator expected after number');
|
||||||
|
|
|
@ -198,7 +198,7 @@ var
|
||||||
nme: string;
|
nme: string;
|
||||||
i: NativeInt;
|
i: NativeInt;
|
||||||
|
|
||||||
// recursivively display members, without master categories.
|
// recursively display members, without master categories.
|
||||||
procedure digMembers(const srcDt: TJsonData; const srcNd: TTreeNode);
|
procedure digMembers(const srcDt: TJsonData; const srcNd: TTreeNode);
|
||||||
var
|
var
|
||||||
_memb: TJsonData;
|
_memb: TJsonData;
|
||||||
|
@ -314,6 +314,7 @@ begin
|
||||||
if memb <> nil then for i := 0 to memb.Count-1 do
|
if memb <> nil then for i := 0 to memb.Count-1 do
|
||||||
begin
|
begin
|
||||||
|
|
||||||
|
ndcat := nil;
|
||||||
// categories
|
// categories
|
||||||
ln := new(PInt64);
|
ln := new(PInt64);
|
||||||
ln^ := memb.Items[i].GetPath('line').AsInt64;
|
ln^ := memb.Items[i].GetPath('line').AsInt64;
|
||||||
|
@ -324,7 +325,8 @@ begin
|
||||||
'class' :ndCat := Tree.Items.AddChildObject(ndClass, nme, ln);
|
'class' :ndCat := Tree.Items.AddChildObject(ndClass, nme, ln);
|
||||||
'enum' :ndCat := Tree.Items.AddChildObject(ndEnum, nme, ln);
|
'enum' :ndCat := Tree.Items.AddChildObject(ndEnum, nme, ln);
|
||||||
'function' :ndCat := Tree.Items.AddChildObject(ndFunc, nme, ln);
|
'function' :ndCat := Tree.Items.AddChildObject(ndFunc, nme, ln);
|
||||||
'import' :ndCat := Tree.Items.AddChildObject(ndImp, nme, ln);
|
'import', 'static import':
|
||||||
|
ndCat := Tree.Items.AddChildObject(ndImp, nme, ln);
|
||||||
'interface' :ndCat := Tree.Items.AddChildObject(ndIntf, nme, ln);
|
'interface' :ndCat := Tree.Items.AddChildObject(ndIntf, nme, ln);
|
||||||
'mixin' :ndCat := Tree.Items.AddChildObject(ndMix, nme, ln);
|
'mixin' :ndCat := Tree.Items.AddChildObject(ndMix, nme, ln);
|
||||||
'struct' :ndCat := Tree.Items.AddChildObject(ndStruct, nme, ln);
|
'struct' :ndCat := Tree.Items.AddChildObject(ndStruct, nme, ln);
|
||||||
|
@ -332,6 +334,14 @@ begin
|
||||||
'variable' :ndCat := Tree.Items.AddChildObject(ndVar, nme, ln);
|
'variable' :ndCat := Tree.Items.AddChildObject(ndVar, nme, ln);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
if ndCat = nil then
|
||||||
|
begin
|
||||||
|
{$IFDEF DEBUG}
|
||||||
|
writeln(memb.Items[i].GetPath('kind').AsString);
|
||||||
|
{$ENDIF}
|
||||||
|
continue;
|
||||||
|
end;
|
||||||
|
|
||||||
ndCat.Parent.Visible := true;
|
ndCat.Parent.Visible := true;
|
||||||
|
|
||||||
//recursive
|
//recursive
|
||||||
|
|
Loading…
Reference in New Issue