public static ToStringTree ( ITree t, IList |
||
t | ITree | |
ruleNames | IList |
|
Результат | string |
public static string ToStringTree(ITree t, IList<string> ruleNames)
{
string s = Utils.EscapeWhitespace(GetNodeText(t, ruleNames), false);
if (t.ChildCount == 0)
{
return s;
}
StringBuilder buf = new StringBuilder();
buf.Append("(");
s = Utils.EscapeWhitespace(GetNodeText(t, ruleNames), false);
buf.Append(s);
buf.Append(' ');
for (int i = 0; i < t.ChildCount; i++)
{
if (i > 0)
{
buf.Append(' ');
}
buf.Append(ToStringTree(t.GetChild(i), ruleNames));
}
buf.Append(")");
return buf.ToString();
}
Trees::ToStringTree ( ITree t ) : string | |
Trees::ToStringTree ( ITree t, Parser recog ) : string |