当前位置: 首页>>代码示例>>C#>>正文


C# NodeVisitor类代码示例

本文整理汇总了C#中NodeVisitor的典型用法代码示例。如果您正苦于以下问题:C# NodeVisitor类的具体用法?C# NodeVisitor怎么用?C# NodeVisitor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


NodeVisitor类属于命名空间,在下文中一共展示了NodeVisitor类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: VisitTreeNodes

 public static void VisitTreeNodes(TreeNodeCollection nodes, NodeVisitor visitNode)
 {
     foreach (TreeNode n in nodes) {
         visitNode(n);
         VisitTreeNodes(n.Nodes, visitNode);
     }
 }
开发者ID:Kopakc,项目名称:Repeater,代码行数:7,代码来源:TraverseTree.cs

示例2: Visit

		/// <summary>Visits the iterator expression and the iterated object expression.</summary>
		/// <remarks>
		/// Visits the iterator expression and the iterated object expression.
		/// There is no body-expression for this loop type.
		/// </remarks>
		public override void Visit(NodeVisitor v)
		{
			if (v.Visit(this))
			{
				iterator.Visit(v);
				iteratedObject.Visit(v);
			}
		}
开发者ID:hazzik,项目名称:Rhino.Net,代码行数:13,代码来源:ArrayComprehensionLoop.cs

示例3: accept

 public void accept(NodeVisitor visitor)
 {
     foreach (Statement child in Children)
     {
         child.accept(visitor);
     }
     visitor.visit(this);
 }
开发者ID:Lateks,项目名称:Mini-PL-Interpreter,代码行数:8,代码来源:AbstractSyntaxTree.cs

示例4: Accept

 public override void Accept(NodeVisitor visitor)
 {
     if (call == null) {
         visitor.VisitAssign(this);
     }
     else {
         call.Accept(visitor);
     }
 }
开发者ID:shugo,项目名称:babel,代码行数:9,代码来源:statement.cs

示例5: Visit

		public override void Visit(NodeVisitor v)
		{
			if (v.Visit(this))
			{
				foreach (Node kid in this)
				{
					((AstNode)kid).Visit(v);
				}
			}
		}
开发者ID:hazzik,项目名称:Rhino.Net,代码行数:10,代码来源:Block.cs

示例6: ConvertRoslynToCCI

    public static void ConvertRoslynToCCI(
      IMetadataHost host,
      Microsoft.CodeAnalysis.CSharp.SyntaxTree tree,
      Microsoft.CodeAnalysis.CSharp.Semantics.SemanticModel semanticModel,
      out IModule module,
      out ISourceLocationProvider sourceLocationProvider) {

      sourceLocationProvider = new SourceLocationProvider();

      var transformer = new NodeVisitor(host, semanticModel, sourceLocationProvider);
      var assembly = (Module)transformer.Visit(tree.GetRoot());
      assembly.Location = Path.GetFullPath(tree.FilePath);
      module = assembly;
    }
开发者ID:asvishnyakov,项目名称:CodeContracts,代码行数:14,代码来源:Utilities.cs

示例7: Visit

		/// <summary>
		/// Visits this node, then each label in the label-list, and finally the
		/// statement.
		/// </summary>
		/// <remarks>
		/// Visits this node, then each label in the label-list, and finally the
		/// statement.
		/// </remarks>
		public override void Visit(NodeVisitor v)
		{
			if (v.Visit(this))
			{
				foreach (AstNode label in labels)
				{
					label.Visit(v);
				}
				statement.Visit(v);
			}
		}
开发者ID:hazzik,项目名称:Rhino.Net,代码行数:19,代码来源:LabeledStatement.cs

示例8: VisitNodes

            VisitNodes(ArrayList nodes, NodeVisitor v)
            {
                if (nodes == null)
                {
                    return;
                }

                for (int i = 0; i < nodes.Count; ++i)
                {
                    ProgressNode node = (ProgressNode)nodes[i];
                    Dbg.Assert(node != null, "nodes should not contain null elements");

                    if (!v.Visit(node, nodes, i))
                    {
                        return;
                    }

                    if (node.Children != null)
                    {
                        VisitNodes(node.Children, v);
                    }
                }
            }
开发者ID:40a,项目名称:PowerShell,代码行数:23,代码来源:PendingProgress.cs

示例9: Visit

		/// <summary>
		/// Visits this node, then the switch-expression, then the cases
		/// in lexical order.
		/// </summary>
		/// <remarks>
		/// Visits this node, then the switch-expression, then the cases
		/// in lexical order.
		/// </remarks>
		public override void Visit(NodeVisitor v)
		{
			if (v.Visit(this))
			{
				expression.Visit(v);
				foreach (SwitchCase sc in GetCases())
				{
					sc.Visit(v);
				}
			}
		}
开发者ID:hazzik,项目名称:Rhino.Net,代码行数:19,代码来源:SwitchStatement.cs

示例10: Accept

 public override void Accept(NodeVisitor visitor)
 {
     visitor.VisitParameterDeclaration(this);
 }
开发者ID:shugo,项目名称:babel,代码行数:4,代码来源:class.cs

示例11: Visit

		/// <summary>Visits this node, then visits its element expressions in order.</summary>
		/// <remarks>
		/// Visits this node, then visits its element expressions in order.
		/// Any empty elements are represented by
		/// <see cref="EmptyExpression">EmptyExpression</see>
		/// objects, so the callback will never be passed
		/// <code>null</code>
		/// .
		/// </remarks>
		public override void Visit(NodeVisitor v)
		{
			if (v.Visit(this))
			{
				foreach (AstNode e in GetElements())
				{
					e.Visit(v);
				}
			}
		}
开发者ID:hazzik,项目名称:Rhino.Net,代码行数:19,代码来源:ArrayLiteral.cs

示例12: Accept

 public abstract void Accept(NodeVisitor visitor);
开发者ID:JoostvdB94,项目名称:DannyJoostCompiler,代码行数:1,代码来源:Node.cs

示例13: Accept

 public override void Accept(NodeVisitor visitor)
 {
     visitor.VisitSourceFile(this);
 }
开发者ID:shugo,项目名称:babel,代码行数:4,代码来源:source.cs

示例14: Accept

 public override void Accept(NodeVisitor visitor)
 {
     visitor.VisitTypeSpecifier(this);
 }
开发者ID:shugo,项目名称:babel,代码行数:4,代码来源:typespec.cs

示例15: Accept

 public override void Accept(NodeVisitor visitor)
 {
     visitor.Visit (this);
 }
开发者ID:jlehva,项目名称:compilers-project-2016,代码行数:4,代码来源:Stmts.cs


注:本文中的NodeVisitor类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。