• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# NodeVisitor类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: Visit

		/// <summary>Visits this node, then the child expression.</summary>
		/// <remarks>Visits this node, then the child expression.</remarks>
		public override void Visit(NodeVisitor v)
		{
			if (v.Visit(this))
			{
				expression.Visit(v);
			}
		}
开发者ID:hazzik,项目名称:Rhino.Net,代码行数:9,代码来源:XmlExpression.cs


示例17: Visit

		/// <summary>
		/// Visits this node, then each
		/// <see cref="VariableInitializer">VariableInitializer</see>
		/// child.
		/// </summary>
		public override void Visit(NodeVisitor v)
		{
			if (v.Visit(this))
			{
				foreach (AstNode var in variables)
				{
					var.Visit(v);
				}
			}
		}
开发者ID:hazzik,项目名称:Rhino.Net,代码行数:15,代码来源:VariableDeclaration.cs


示例18: Visit

		/// <summary>
		/// Jumps are only used directly during code generation, and do
		/// not support this interface.
		/// </summary>
		/// <remarks>
		/// Jumps are only used directly during code generation, and do
		/// not support this interface.
		/// </remarks>
		/// <exception cref="System.NotSupportedException">System.NotSupportedException</exception>
		public override void Visit(NodeVisitor visitor)
		{
			throw new NotSupportedException(this.ToString());
		}
开发者ID:hazzik,项目名称:Rhino.Net,代码行数:13,代码来源:Jump.cs


示例19: Visit

		/// <summary>Visits this node.</summary>
		/// <remarks>Visits this node.  There are no children to visit.</remarks>
		public override void Visit(NodeVisitor v)
		{
			v.Visit(this);
		}
开发者ID:hazzik,项目名称:Rhino.Net,代码行数:6,代码来源:NumberLiteral.cs


示例20: Visit

		/// <summary>
		/// Visits this node, then the try-block, then any catch clauses,
		/// and then any finally block.
		/// </summary>
		/// <remarks>
		/// Visits this node, then the try-block, then any catch clauses,
		/// and then any finally block.
		/// </remarks>
		public override void Visit(NodeVisitor v)
		{
			if (v.Visit(this))
			{
				tryBlock.Visit(v);
				foreach (CatchClause cc in GetCatchClauses())
				{
					cc.Visit(v);
				}
				if (finallyBlock != null)
				{
					finallyBlock.Visit(v);
				}
			}
		}
开发者ID:hazzik,项目名称:Rhino.Net,代码行数:23,代码来源:TryStatement.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Nodes类代码示例发布时间:2022-05-24
下一篇:
C# NodeType类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap