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

C# BreakStatement类代码示例

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

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



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

示例1: BreakStatementProducesBreakWithLabel

        public void BreakStatementProducesBreakWithLabel()
        {
            var b = new BreakStatement("a");

            Assert.AreEqual("a", b.Label);
            Assert.AreEqual("break a;", b.ToString());
        }
开发者ID:DaveVdE,项目名称:adamjsgenerator,代码行数:7,代码来源:BreakStatementTests.cs


示例2: Statement


//.........这里部分代码省略.........

                    while (laKind != Case && laKind != Default && laKind != CloseCurlyBrace && !IsEOF)
                    {
                        var stmt = Statement(Scope: Scope, Parent: ssds);

                        if (stmt != null)
                        {
                            stmt.Parent = ssds;
                            ssdssl.Add(stmt);
                        }
                    }

                    ssds.ScopeStatementList = ssdssl.ToArray();
                    ssds.EndLocation = t.EndLocation;

                    return ssds;
                case Continue:
                    Step();
                    var cs = new ContinueStatement() { Location = t.Location, Parent = Parent };
                    if (laKind == (Identifier))
                    {
                        Step();
                        cs.Identifier = t.Value;
                    }
                    else if(IsEOF)
                        cs.IdentifierHash = DTokens.IncompleteIdHash;

                    Expect(Semicolon);
                    cs.EndLocation = t.EndLocation;

                    return cs;
                case Break:
                    Step();
                    var bs = new BreakStatement() { Location = t.Location, Parent = Parent };

                    if (laKind == (Identifier))
                    {
                        Step();
                        bs.Identifier = t.Value;
                    }
                    else if(IsEOF)
                        bs.IdentifierHash = DTokens.IncompleteIdHash;

                    Expect(Semicolon);

                    bs.EndLocation = t.EndLocation;

                    return bs;
                case Return:
                    Step();
                    var rs = new ReturnStatement() { Location = t.Location, Parent = Parent };

                    if (laKind != (Semicolon))
                        rs.ReturnExpression = Expression(Scope);

                    Expect(Semicolon);
                    rs.EndLocation = t.EndLocation;

                    return rs;
                case Goto:
                    Step();
                    var gs = new GotoStatement() { Location = t.Location, Parent = Parent };

                    switch(laKind)
                    {
                        case Identifier:
开发者ID:rainers,项目名称:D_Parser,代码行数:67,代码来源:Parser_Impl.cs


示例3: Visit

			public override object Visit (Break breakStatement)
			{
				var result = new BreakStatement ();
				var location = LocationsBag.GetLocations (breakStatement);
				
				result.AddChild (new CSharpTokenNode (Convert (breakStatement.loc), "break".Length), BreakStatement.Roles.Keyword);
				if (location != null)
					result.AddChild (new CSharpTokenNode (Convert (location[0]), 1), BreakStatement.Roles.Semicolon);
				return result;
			}
开发者ID:pgoron,项目名称:monodevelop,代码行数:10,代码来源:CSharpParser.cs


示例4: VisitBreakStatement

		public virtual void VisitBreakStatement (BreakStatement breakStatement)
		{
			VisitChildren (breakStatement);
		}
开发者ID:modulexcite,项目名称:ICSharpCode.Decompiler-retired,代码行数:4,代码来源:DepthFirstAstVisitor.cs


示例5: Walk

 // BreakStatement
 public override bool Walk(BreakStatement node) { return false; }
开发者ID:jxnmaomao,项目名称:ironruby,代码行数:2,代码来源:PythonWalker.Generated.cs


示例6: Walk

 // BreakStatement
 protected internal virtual bool Walk(BreakStatement node) { return true; }
开发者ID:JamesTryand,项目名称:IronScheme,代码行数:2,代码来源:Walker.Generated.cs


示例7: Exit

 public override void Exit(BreakStatement node)
 {
     level--;
 }
开发者ID:buunguyen,项目名称:bike,代码行数:4,代码来源:PrintNodeWalker.cs


示例8: actionPerformed

 /**
  * Call back method that must be called as soon as the given <code>
  * BreakStatement</code> object has been traversed.
  *
  * @param pBreakStatement  The <code>BreakStatement</code> object that has
  *                         just been traversed.
  */
 public void actionPerformed(
      BreakStatement pBreakStatement)
 {
     // Nothing to do.
 }
开发者ID:smartmobili,项目名称:parsing,代码行数:12,代码来源:TraverseActionAdapter.cs


示例9: performAction

 /**
  * Call back method that must be called when the given <code>BreakStatement
  * </code> will become the next <i>traverse candidate</i>.
  *
  * @param pBreakStatement  The <code>BreakStatement</code> object that will
  *                         become the next <i>traverse candidate</i>.
  */
 public void performAction(
      BreakStatement pBreakStatement)
 {
     // Nothing to do.
 }
开发者ID:smartmobili,项目名称:parsing,代码行数:12,代码来源:TraverseActionAdapter.cs


示例10: VisitBreakStatement

		public override void VisitBreakStatement(BreakStatement breakStatement)
		{
			FixSemicolon(breakStatement.SemicolonToken);
		}
开发者ID:txdv,项目名称:monodevelop,代码行数:4,代码来源:AstFormattingVisitor.cs


示例11: VisitBreakStatement

		public override void VisitBreakStatement (BreakStatement node)
		{
			WriteKeyword ("break");
			WriteToken (";");
			WriteLine ();
		}
开发者ID:transformersprimeabcxyz,项目名称:cecil-old,代码行数:6,代码来源:CSharpWriter.cs


示例12: VisitBreak

 public void VisitBreak(BreakStatement b)
 {
     throw new NotImplementedException();
 }
开发者ID:uxmal,项目名称:pytocs,代码行数:4,代码来源:PyStatementWriter.cs


示例13: VisitBreakStatement

		public virtual void VisitBreakStatement(BreakStatement breakStatement)
		{
			StartNode(breakStatement);
			WriteKeyword("break", BreakStatement.BreakKeywordRole);
			Semicolon();
			EndNode(breakStatement);
		}
开发者ID:icsharpcode,项目名称:NRefactory,代码行数:7,代码来源:CSharpOutputVisitor.cs


示例14: VisitBreakStatement

 public void VisitBreakStatement(BreakStatement breakStatement)
 {
     // EMPTY
 }
开发者ID:xuld,项目名称:DocPlus,代码行数:4,代码来源:DocAstVistor.cs


示例15: Walk

        public override bool Walk(BreakStatement node)
        {
            node.Parent = _currentScope;
            node.LoopStatement = _loops[_loops.Count - 1];

            return base.Walk(node);
        }
开发者ID:TerabyteX,项目名称:main,代码行数:7,代码来源:PythonNameBinder.cs


示例16: Enter

 public override bool Enter(BreakStatement node)
 {
     Print("BreakStatement");
     level++;
     return true;
 }
开发者ID:buunguyen,项目名称:bike,代码行数:6,代码来源:PrintNodeWalker.cs


示例17: Visit

 public void Visit(BreakStatement expression)
 {
     if (expression.TargetLabel == null)
         outStream.Write("break");
     else
         outStream.Write("break {0}", expression.TargetLabel.Name);
 }
开发者ID:reshadi2,项目名称:mcjs,代码行数:7,代码来源:AstWriter.cs


示例18: Visit

		public virtual void Visit(BreakStatement s)
		{
			VisitAbstractStmt(s);
		}
开发者ID:DinrusGroup,项目名称:DinrusIDE,代码行数:4,代码来源:DefaultDepthFirstVisitor.cs


示例19: VisitBreakStatement

 public virtual void VisitBreakStatement(BreakStatement breakStatement)
 {
     if (this.ThrowException)
     {
         throw (Exception)this.CreateException(breakStatement);
     }
 }
开发者ID:fabriciomurta,项目名称:BridgeUnified,代码行数:7,代码来源:Visitor.Exception.cs


示例20: PostWalk

 protected internal virtual void PostWalk(BreakStatement node) { }
开发者ID:JamesTryand,项目名称:IronScheme,代码行数:1,代码来源:Walker.Generated.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# BrightIdeasSoftware类代码示例发布时间:2022-05-24
下一篇:
C# BrandingType类代码示例发布时间: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