本文整理汇总了C#中CSsemi.display方法的典型用法代码示例。如果您正苦于以下问题:C# CSsemi.display方法的具体用法?C# CSsemi.display怎么用?C# CSsemi.display使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CSsemi
的用法示例。
在下文中一共展示了CSsemi.display方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: doAction
public override void doAction(CSsemi.CSemiExp semi, string filename)
{
Elem elem;
try
{
elem = repo_.stack.pop();
for (int i = 0; i < repo_.locations.Count; ++i)
{
Elem temp = repo_.locations[i];
if (elem.type == temp.type)
{
if (elem.name == temp.name)
{
if ((repo_.locations[i]).end == 0)
{
(repo_.locations[i]).end = repo_.semi.lineCount;
elem.end = repo_.semi.lineCount;
break;
}
}
}
}
}
catch
{
Console.Write("popped empty stack on semiExp: ");
semi.display();
return;
}
CSsemi.CSemiExp local = new CSsemi.CSemiExp();
local.Add(elem.type).Add(elem.name);
if (local[0] == "control")
return;
if (AAction.displaySemi)
{
Console.Write("\n line# {0,-5}", repo_.semi.lineCount);
Console.Write("leaving ");
string indent = new string(' ', 2 * (repo_.stack.count + 1));
Console.Write("{0}", indent);
this.display(local); // defined in abstract action
}
}
示例2: test
public override bool test(CSsemi.CSemiExp semi)
{
if (semi.count > 0 && semi[semi.count - 1] == "}")
{
scope_.Pop();
semi.display();
doActions(scopeToSemi(scope_));
}
else if (semi.count > 0 && semi[semi.count - 1] == "{")
{
int index = semi.Contains("namespace");
if (index != -1)
{
string temp = "namespace:" + semi[index + 1];
scope_.Push(temp);
}
else
{
index = indexOfType(semi);
if (index != -1)
{
string temp = "type:" + semi[index + 1];
scope_.Push(temp);
}
else
{
int jndex = semi.Contains("(");
if (jndex != -1 && !DetectFunction.isSpecialToken(semi[jndex - 1]))
{
string temp = "function:" + semi[jndex - 1];
scope_.Push(temp);
}
else
scope_.Push("local");
}
}
Console.WriteLine();
semi.display();
doActions(scopeToSemi(scope_));
}
return false;
}