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


C# ReferenceExpression.set_Name方法代码示例

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


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

示例1: typeof_with_expression

 protected Expression typeof_with_expression()
 {
     Expression expression = null;
     IToken token = null;
     try
     {
         Expression expression2;
         token = this.LT(1);
         this.match(0x2c);
         if ((this.LA(1) == 0x3f) && tokenSet_16_.member(this.LA(2)))
         {
             this.match(0x3f);
             expression2 = this.expression();
             this.match(0x40);
         }
         else
         {
             if (!tokenSet_16_.member(this.LA(1)) || !tokenSet_20_.member(this.LA(2)))
             {
                 throw new NoViableAltException(this.LT(1), this.getFilename());
             }
             expression2 = this.expression();
         }
         if (base.inputState.guessing == 0)
         {
             ReferenceExpression expression4;
             MethodInvocationExpression expression3 = new MethodInvocationExpression(ToLexicalInfo(token));
             ReferenceExpression expression1 = expression4 = new ReferenceExpression(ToLexicalInfo(token));
             expression4.set_Name(token.getText());
             expression3.set_Target(expression4);
             expression3.get_Arguments().Add(expression2);
             expression = expression3;
         }
     }
     catch (RecognitionException exception)
     {
         if (base.inputState.guessing != 0)
         {
             throw;
         }
         this.reportError(exception);
         this.recover(exception, tokenSet_20_);
         return expression;
     }
     return expression;
 }
开发者ID:CarlosHBC,项目名称:UnityDecompiled,代码行数:46,代码来源:UnityScriptParser.cs

示例2: GetContextFieldDeclaration

 public ClassDefinition GetContextFieldDeclaration()
 {
     Field field;
     Field field2;
     ParameterDeclaration declaration;
     MemberReferenceExpression expression;
     ReferenceExpression expression2;
     BinaryExpression expression3;
     ReferenceExpression expression4;
     ReferenceExpression expression5;
     MemberReferenceExpression expression6;
     BinaryExpression expression7;
     Block block;
     Constructor constructor;
     ClassDefinition definition;
     Type type = this._evaluationContext.GetType();
     Type type2 = this._evaluationContext.ScriptContainer.GetType();
     ClassDefinition definition1 = definition = new ClassDefinition(LexicalInfo.Empty);
     definition.set_Name("_");
     TypeMember[] memberArray1 = new TypeMember[3];
     Field field1 = field = new Field(LexicalInfo.Empty);
     field.set_Modifiers(40);
     field.set_Name("ScriptContainer");
     field.set_Type(TypeReference.Lift(type2));
     field.set_IsVolatile(false);
     memberArray1[0] = field;
     Field field3 = field2 = new Field(LexicalInfo.Empty);
     field2.set_Name("EvaluationContext");
     field2.set_Type(TypeReference.Lift(type));
     field2.set_IsVolatile(false);
     memberArray1[1] = field2;
     Constructor constructor1 = constructor = new Constructor(LexicalInfo.Empty);
     constructor.set_Name("constructor");
     ParameterDeclaration[] declarationArray1 = new ParameterDeclaration[1];
     ParameterDeclaration declaration1 = declaration = new ParameterDeclaration(LexicalInfo.Empty);
     declaration.set_Name("context");
     declaration.set_Type(TypeReference.Lift(type));
     declarationArray1[0] = declaration;
     constructor.set_Parameters(ParameterDeclarationCollection.FromArray(false, declarationArray1));
     Block block1 = block = new Block(LexicalInfo.Empty);
     Statement[] statementArray1 = new Statement[2];
     BinaryExpression expression1 = expression3 = new BinaryExpression(LexicalInfo.Empty);
     expression3.set_Operator(15);
     MemberReferenceExpression expression14 = expression = new MemberReferenceExpression(LexicalInfo.Empty);
     expression.set_Name("EvaluationContext");
     expression.set_Target(new SelfLiteralExpression(LexicalInfo.Empty));
     expression3.set_Left(expression);
     ReferenceExpression expression15 = expression2 = new ReferenceExpression(LexicalInfo.Empty);
     expression2.set_Name("context");
     expression3.set_Right(expression2);
     statementArray1[0] = Statement.Lift(expression3);
     BinaryExpression expression16 = expression7 = new BinaryExpression(LexicalInfo.Empty);
     expression7.set_Operator(15);
     ReferenceExpression expression17 = expression4 = new ReferenceExpression(LexicalInfo.Empty);
     expression4.set_Name("ScriptContainer");
     expression7.set_Left(expression4);
     MemberReferenceExpression expression18 = expression6 = new MemberReferenceExpression(LexicalInfo.Empty);
     expression6.set_Name("ScriptContainer");
     ReferenceExpression expression19 = expression5 = new ReferenceExpression(LexicalInfo.Empty);
     expression5.set_Name("context");
     expression6.set_Target(expression5);
     expression7.set_Right(expression6);
     statementArray1[1] = Statement.Lift(expression7);
     block.set_Statements(StatementCollection.FromArray(statementArray1));
     constructor.set_Body(block);
     memberArray1[2] = constructor;
     definition.set_Members(TypeMemberCollection.FromArray(memberArray1));
     return definition;
 }
开发者ID:CarlosHBC,项目名称:UnityDecompiled,代码行数:69,代码来源:IntroduceEvaluationContext.cs

示例3: simple_reference_expression

        public Expression simple_reference_expression()
        {
            Expression expression = null;
            IToken token = null;
            IToken token2 = null;
            try
            {
                switch (this.LA(1))
                {
                    case 0x3b:
                        token = this.LT(1);
                        this.match(0x3b);
                        break;

                    case 12:
                        token2 = this.LT(1);
                        this.match(12);
                        if (base.inputState.guessing == 0)
                        {
                            token = token2;
                        }
                        break;

                    default:
                        throw new NoViableAltException(this.LT(1), this.getFilename());
                }
                if (base.inputState.guessing == 0)
                {
                    ReferenceExpression expression2;
                    ReferenceExpression expression1 = expression2 = new ReferenceExpression(ToLexicalInfo(token));
                    expression2.set_Name(token.getText());
                    expression = expression2;
                }
            }
            catch (RecognitionException exception)
            {
                if (base.inputState.guessing != 0)
                {
                    throw;
                }
                this.reportError(exception);
                this.recover(exception, tokenSet_20_);
                return expression;
            }
            return expression;
        }
开发者ID:CarlosHBC,项目名称:UnityDecompiled,代码行数:46,代码来源:UnityScriptParser.cs


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