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


C# MacroStatement.set_Name方法代码示例

本文整理汇总了C#中Boo.Lang.Compiler.Ast.MacroStatement.set_Name方法的典型用法代码示例。如果您正苦于以下问题:C# MacroStatement.set_Name方法的具体用法?C# MacroStatement.set_Name怎么用?C# MacroStatement.set_Name使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Boo.Lang.Compiler.Ast.MacroStatement的用法示例。


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

示例1: switch_statement

 public void switch_statement(Block container)
 {
     IToken token = null;
     IToken token2 = null;
     IToken token3 = null;
     IToken token4 = null;
     try
     {
         Block block;
         MacroStatement statement4;
         Block block2;
         token = this.LT(1);
         this.match(0x31);
         Expression expression = this.paren_expression();
         if (base.inputState.guessing == 0)
         {
             MacroStatement statement;
             MacroStatement statement1 = statement = new MacroStatement(ToLexicalInfo(token));
             statement.set_Name(this.MacroName(token.getText()));
             MacroStatement statement2 = statement;
             statement2.get_Arguments().Add(expression);
             block = statement2.get_Body();
             container.Add(statement2);
         }
         this.match(0x3d);
     Label_0088:
         if (this.LA(1) == 50)
         {
             token2 = this.LT(1);
             this.match(50);
             expression = this.expression();
             this.match(0x42);
             if (base.inputState.guessing == 0)
             {
                 MacroStatement statement3;
                 MacroStatement statement6 = statement3 = new MacroStatement(ToLexicalInfo(token2));
                 statement3.set_Name(token2.getText());
                 statement4 = statement3;
                 statement4.get_Arguments().Add(expression);
                 block2 = statement4.get_Body();
                 block.Add(statement4);
             }
             while (this.LA(1) == 50)
             {
                 token3 = this.LT(1);
                 this.match(50);
                 expression = this.expression();
                 this.match(0x42);
                 if (base.inputState.guessing == 0)
                 {
                     statement4.get_Arguments().Add(expression);
                 }
             }
             int num = 0;
             while (true)
             {
                 if (tokenSet_2_.member(this.LA(1)))
                 {
                     this.statement(block2);
                 }
                 else
                 {
                     if (num < 1)
                     {
                         throw new NoViableAltException(this.LT(1), this.getFilename());
                     }
                     goto Label_0088;
                 }
                 num++;
             }
         }
         int num2 = this.LA(1);
         if (num2 == 0x33)
         {
             token4 = this.LT(1);
             this.match(0x33);
             this.match(0x42);
             if (base.inputState.guessing == 0)
             {
                 MacroStatement statement5;
                 MacroStatement statement7 = statement5 = new MacroStatement(ToLexicalInfo(token4));
                 statement5.set_Name(token4.getText());
                 statement4 = statement5;
                 block2 = statement4.get_Body();
                 block.Add(statement4);
             }
             int num3 = 0;
             while (true)
             {
                 if (tokenSet_2_.member(this.LA(1)))
                 {
                     this.statement(block2);
                 }
                 else
                 {
                     if (num3 < 1)
                     {
                         throw new NoViableAltException(this.LT(1), this.getFilename());
                     }
                     goto Label_02C9;
//.........这里部分代码省略.........
开发者ID:CarlosHBC,项目名称:UnityDecompiled,代码行数:101,代码来源:UnityScriptParser.cs

示例2: macro_application_block

 public void macro_application_block(Block container)
 {
     MacroStatement statement = new MacroStatement();
     ExpressionCollection ec = statement.get_Arguments();
     Block b = statement.get_Body();
     try
     {
         Token token = this.member();
         bool flag = false;
         if ((this.LA(1) == 0x3d) && tokenSet_13_.member(this.LA(2)))
         {
             int num = this.mark();
             flag = true;
             base.inputState.guessing++;
             try
             {
                 this.match(0x3d);
             }
             catch (RecognitionException)
             {
                 flag = false;
             }
             this.rewind(num);
             base.inputState.guessing--;
         }
         if (flag)
         {
             this.compound_statement(b);
         }
         else
         {
             if (!tokenSet_16_.member(this.LA(1)) || !tokenSet_44_.member(this.LA(2)))
             {
                 throw new NoViableAltException(this.LT(1), this.getFilename());
             }
             this.expression_list(ec);
             this.compound_statement(b);
         }
         if (base.inputState.guessing == 0)
         {
             statement.set_LexicalInfo(ToLexicalInfo(token));
             statement.set_Name(token.getText());
             container.Add(statement);
         }
     }
     catch (RecognitionException exception2)
     {
         if (base.inputState.guessing != 0)
         {
             throw;
         }
         this.reportError(exception2);
         this.recover(exception2, tokenSet_15_);
     }
 }
开发者ID:CarlosHBC,项目名称:UnityDecompiled,代码行数:55,代码来源:UnityScriptParser.cs


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