Skip to content

Commit

Permalink
added printing of parallel calls
Browse files Browse the repository at this point in the history
  • Loading branch information
shazqadeer committed Dec 31, 2019
1 parent a4bad12 commit ca09982
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions Source/Core/AbsyCmd.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2278,6 +2278,58 @@ public override Absy StdDispatch(StandardVisitor visitor)
Contract.Ensures(Contract.Result<Absy>() != null);
return visitor.VisitParCallCmd(this);
}
public override void Emit(TokenTextWriter stream, int level)
{
stream.Write(this, level, "");
stream.Write("par ");
EmitAttributes(stream, Attributes);
string sep = "";
bool first = true;
foreach (var callCmd in CallCmds)
{
if (!first)
{
stream.Write(" | ");
}
first = false;
if (callCmd.Outs.Count > 0)
{
foreach (Expr arg in callCmd.Outs)
{
stream.Write(sep);
sep = ", ";
if (arg == null)
{
stream.Write("*");
}
else
{
arg.Emit(stream);
}
}
stream.Write(" := ");
}
stream.Write(TokenTextWriter.SanitizeIdentifier(callCmd.callee));
stream.Write("(");
sep = "";
foreach (Expr arg in callCmd.Ins)
{
stream.Write(sep);
sep = ", ";
if (arg == null)
{
stream.Write("*");
}
else
{
arg.Emit(stream);
}
}
stream.Write(")");
}
stream.WriteLine(";");
base.Emit(stream, level);
}
}

public class CallCmd : CallCommonality, IPotentialErrorNode<object, object>
Expand Down

0 comments on commit ca09982

Please sign in to comment.