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


C# EmptyStatement类代码示例

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


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

示例1: Construtor_Coloca_Type_Corretamente_Em_Nos_Filhos

        public void Construtor_Coloca_Type_Corretamente_Em_Nos_Filhos()
        {
            var programa = new Program();
            Assert.AreEqual(programa.Type, "Program");

            var emptyStatement = new EmptyStatement();
            Assert.AreEqual(emptyStatement.Type, "EmptyStatement");
        }
开发者ID:ffarzat,项目名称:ConsoleComV8,代码行数:8,代码来源:NodeTestes.cs

示例2: Visit

			public override object Visit(ICSharpCode.NRefactory.MonoCSharp.EmptyStatement emptyStatement)
			{
				var result = new EmptyStatement();
				result.Location = Convert(emptyStatement.loc);
				return result;
			}
开发者ID:furesoft,项目名称:NRefactory,代码行数:6,代码来源:CSharpParser.cs

示例3: VisitEmptyStatement

 public void VisitEmptyStatement(EmptyStatement emptyStmt)
 {
     //no op
 }
开发者ID:hazama-yuinyan,项目名称:Expresso,代码行数:4,代码来源:ExpressoNameBinder.cs

示例4: PostWalk

 public override void PostWalk(EmptyStatement node) { }
开发者ID:jxnmaomao,项目名称:ironruby,代码行数:1,代码来源:PythonWalker.Generated.cs

示例5: CSharpGrammar


//.........这里部分代码省略.........
            var queryBodyClauses = new GrammarDefinition("QueryBodyClauses");
            queryBodyClauses.Rule = queryBodyClause | queryBodyClauses + queryBodyClause;

            var queryBodyClausesOptional = new GrammarDefinition("QueryBodyClausesOptional",
                rule: null | queryBodyClauses);

            var linqExpression = new GrammarDefinition("LinqExpression",
                rule: fromClause + queryBodyClausesOptional + selectClause,
                createNode: node =>
                {
                    var result = new LinqExpression();
                    result.Clauses.Add((LinqClause) node.Children[0].Result);

                    if (node.Children[1].HasChildren)
                    {
                        result.Clauses.AddRange(node.Children[1].Children[0].GetAllListAstNodes().Cast<LinqClause>());
                    }

                    result.Clauses.Add((LinqClause) node.Children[2].Result);
                    return result;
                });

            expression.Rule = conditionalExpression
                              | linqExpression
                              | lambdaExpression
                              | assignmentExpression;

            #endregion

            #region Statements
            var statement = new GrammarDefinition("Statement");
            var embeddedStatement = new GrammarDefinition("EmbeddedStatement");

            var emptyStatement = new GrammarDefinition("EmptyStatement",
                rule: ToElement(SEMICOLON),
                createNode: node =>
                {
                    var result = new EmptyStatement();
                    result.AddChild(AstNodeTitles.Semicolon, node.Children[0].Result);
                    return result;
                });

            var labelStatement = new GrammarDefinition("LabelStatement",
                rule: identifierInsideBody + ToElement(COLON),
                createNode: node => new LabelStatement((Identifier) node.Children[0].Result)
                {
                    Colon = (AstToken) node.Children[1].Result
                });

            var expressionStatement = new GrammarDefinition("ExpressionStatement",
                rule: expression + ToElement(SEMICOLON)
                      | Error + ToElement(SEMICOLON)
                      | Error + ToElement(CLOSE_BRACE)
                      | expression + ToElement(CLOSE_BRACE), // Common mistake in C# is to forget the semicolon at the end of a statement.
                createNode: node =>
                {
                    var result = new ExpressionStatement(node.Children[0].Result as Expression);

                    var endingToken = (AstToken) node.Children[1].Result;
                    if (endingToken.GetTokenCode() == (int) SEMICOLON)
                    {
                        result.AddChild(AstNodeTitles.Semicolon, node.Children[1].Result);
                    }
                    else
                    {
                        node.Context.SyntaxErrors.Add(new SyntaxError(
开发者ID:JerreS,项目名称:AbstractCode,代码行数:67,代码来源:CSharpGrammar.cs

示例6: PostWalk

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

示例7: Exit

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

示例8: case_907

void case_907()
#line 6067 "cs-parser.jay"
{
		Error_SyntaxError (yyToken);
		yyVal = new EmptyStatement (GetLocation (yyVals[0+yyTop]));
	  }
开发者ID:furesoft,项目名称:NRefactory,代码行数:6,代码来源:cs-parser.cs

示例9: case_859

void case_859()
#line 5773 "cs-parser.jay"
{
		/* Uses lexer.Location because semicolon location is not kept in quick mode*/
		yyVal = new EmptyStatement (lexer.Location);
	  }
开发者ID:furesoft,项目名称:NRefactory,代码行数:6,代码来源:cs-parser.cs

示例10: yyparse


//.........这里部分代码省略.........
  break;
case 938:
  case_938();
  break;
case 939:
#line 6264 "cs-parser.jay"
  {
		yyVal = yyVals[0+yyTop];
	  }
  break;
case 940:
  case_940();
  break;
case 941:
  case_941();
  break;
case 942:
#line 6285 "cs-parser.jay"
  {
		yyVal = yyVals[0+yyTop];
	  }
  break;
case 943:
  case_943();
  break;
case 944:
  case_944();
  break;
case 945:
  case_945();
  break;
case 946:
#line 6319 "cs-parser.jay"
  { yyVal = new EmptyStatement (lexer.Location); }
  break;
case 948:
  case_948();
  break;
case 949:
  case_949();
  break;
case 951:
#line 6343 "cs-parser.jay"
  { yyVal = null; }
  break;
case 953:
#line 6348 "cs-parser.jay"
  { yyVal = new EmptyStatement (lexer.Location); }
  break;
case 957:
  case_957();
  break;
case 958:
  case_958();
  break;
case 959:
  case_959();
  break;
case 960:
  case_960();
  break;
case 961:
  case_961();
  break;
case 962:
  case_962();
开发者ID:furesoft,项目名称:NRefactory,代码行数:67,代码来源:cs-parser.cs

示例11: VisitEmptyStatement

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

示例12: VisitEmptyStatement

 public override void VisitEmptyStatement(EmptyStatement emptyStatement)
 {
     _result.Add(new JsEmptyStatement());
 }
开发者ID:jack128,项目名称:SaltarelleCompiler,代码行数:4,代码来源:StatementCompiler.cs

示例13: VisitEmptyStatement

 public void VisitEmptyStatement(EmptyStatement statement)
 {
     Formatter.StartNode(statement);
     WriteSemicolon();
     Formatter.EndNode();
 }
开发者ID:JerreS,项目名称:AbstractCode,代码行数:6,代码来源:CSharpAstWriter.cs

示例14: Visit

			public override object Visit (Mono.CSharpPs.EmptyStatement emptyStatement)
			{
				var result = new EmptyStatement ();
				result.Location = Convert (emptyStatement.loc);
				return result;
			}
开发者ID:RainsSoft,项目名称:playscript-monodevelop,代码行数:6,代码来源:CSharpParser.cs

示例15: VisitEmptyStatement

		public override void VisitEmptyStatement(EmptyStatement emptyStatement)
		{
			// Empty
		}
开发者ID:txdv,项目名称:monodevelop,代码行数:4,代码来源:AstFormattingVisitor.cs


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