AST Refactoring
This commit is contained in:
@@ -365,10 +365,10 @@ begin
|
||||
try
|
||||
sb.Append(calleeStr);
|
||||
sb.Append('(');
|
||||
for i := 0 to Node.Arguments.Count - 1 do
|
||||
for i := 0 to High(Node.Arguments) do
|
||||
begin
|
||||
sb.Append(Node.Arguments[i].Accept(Self).AsText);
|
||||
if i < Node.Arguments.Count - 1 then
|
||||
if i < High(Node.Arguments) then
|
||||
sb.Append(', ');
|
||||
end;
|
||||
sb.Append(')');
|
||||
@@ -1405,9 +1405,9 @@ begin
|
||||
end
|
||||
else
|
||||
begin
|
||||
SetLength(inputExpressions, 1 + Node.Arguments.Count);
|
||||
SetLength(inputExpressions, 1 + Length(Node.Arguments));
|
||||
inputExpressions[0] := Node.Callee;
|
||||
for var i := 0 to Node.Arguments.Count - 1 do
|
||||
for var i := 0 to High(Node.Arguments) do
|
||||
inputExpressions[i + 1] := Node.Arguments[i];
|
||||
|
||||
VisitOperatorNode(
|
||||
@@ -1425,8 +1425,8 @@ begin
|
||||
CreateEntry(funcCallNode);
|
||||
calleePin := CreateInput(funcCallNode, 'Callee');
|
||||
|
||||
SetLength(argPin, Node.Arguments.Count);
|
||||
for i := 0 to Node.Arguments.Count - 1 do
|
||||
SetLength(argPin, Length(Node.Arguments));
|
||||
for i := 0 to High(argPin) do
|
||||
argPin[i] := CreateInput(funcCallNode, 'Arg' + i.ToString);
|
||||
|
||||
CreateExit(funcCallNode, '');
|
||||
@@ -1434,7 +1434,7 @@ begin
|
||||
|
||||
if Assigned(InputResults[0].OutputPin) then
|
||||
FConnections.Add(TPinConnection.Create(InputResults[0].OutputPin, calleePin));
|
||||
for i := 0 to Node.Arguments.Count - 1 do
|
||||
for i := 0 to High(Node.Arguments) do
|
||||
if Assigned(InputResults[i + 1].OutputPin) then
|
||||
FConnections.Add(TPinConnection.Create(InputResults[i + 1].OutputPin, argPin[i]));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user