本文整理汇总了C#中Boo.Lang.Compiler.Ast.BinaryExpression.set_Right方法的典型用法代码示例。如果您正苦于以下问题:C# BinaryExpression.set_Right方法的具体用法?C# BinaryExpression.set_Right怎么用?C# BinaryExpression.set_Right使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Boo.Lang.Compiler.Ast.BinaryExpression
的用法示例。
在下文中一共展示了BinaryExpression.set_Right方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ComparisonFor
public static Expression ComparisonFor(Expression local, IEnumerable<Expression> expressions)
{
BinaryExpression expression;
IEnumerator<Expression> enumerator = expressions.GetEnumerator();
if (!enumerator.MoveNext())
{
throw new AssertionFailedException("e.MoveNext()");
}
BinaryExpression expression1 = expression = new BinaryExpression(LexicalInfo.Empty);
expression.set_Operator(11);
expression.set_Left(Expression.Lift(local));
expression.set_Right(Expression.Lift(enumerator.Current));
Expression expression2 = expression;
while (enumerator.MoveNext())
{
BinaryExpression expression3;
BinaryExpression expression4;
BinaryExpression expression11 = expression4 = new BinaryExpression(LexicalInfo.Empty);
expression4.set_Operator(0x1c);
expression4.set_Left(Expression.Lift(expression2));
BinaryExpression expression12 = expression3 = new BinaryExpression(LexicalInfo.Empty);
expression3.set_Operator(11);
expression3.set_Left(Expression.Lift(local));
expression3.set_Right(Expression.Lift(enumerator.Current));
expression4.set_Right(expression3);
expression2 = expression4;
}
return expression2;
}
示例2: ApplyImplicitArrayConversion
public void ApplyImplicitArrayConversion(BinaryExpression node)
{
IType expressionType = this.GetExpressionType(node.get_Left());
if (expressionType.get_IsArray())
{
IType type2 = this.GetExpressionType(node.get_Right());
if (type2 == this.UnityScriptLangArray())
{
node.set_Right(this.get_CodeBuilder().CreateCast(expressionType, this.get_CodeBuilder().CreateMethodInvocation(node.get_Right(), this.ResolveMethod(type2, "ToBuiltin"), this.get_CodeBuilder().CreateTypeofExpression(expressionType.get_ElementType()))));
}
}
}
示例3: 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;
}
示例4: assignment_expression
//.........这里部分代码省略.........
type = 0x21;
}
break;
case 0x5e:
token9 = this.LT(1);
this.match(0x5e);
if (base.inputState.guessing == 0)
{
token11 = token9;
type = 0x23;
}
break;
case 0x62:
token10 = this.LT(1);
this.match(0x62);
if (base.inputState.guessing == 0)
{
token11 = token10;
type = 0x25;
}
break;
default:
throw new NoViableAltException(this.LT(1), this.getFilename());
}
Expression expression2 = this.assignment_expression();
if (base.inputState.guessing == 0)
{
BinaryExpression expression3 = new BinaryExpression(ToLexicalInfo(token11));
expression3.set_Operator(type);
expression3.set_Left(expression);
expression3.set_Right(expression2);
expression = expression3;
}
return expression;
}
switch (num)
{
case 1:
case 5:
case 7:
case 8:
case 9:
case 10:
case 11:
case 12:
case 13:
case 15:
case 0x10:
case 0x11:
case 0x12:
case 0x13:
case 20:
case 0x15:
case 0x19:
case 0x1b:
case 0x1d:
case 30:
case 0x1f:
case 0x20:
case 0x21:
case 0x23:
case 0x24:
case 0x25:
示例5: term
public Expression term()
{
Expression expression = null;
IToken token = null;
IToken token2 = null;
IToken token3 = null;
BinaryOperatorType type = 0;
try
{
expression = this.unary_expression();
while (true)
{
IToken token4;
if (((this.LA(1) != 0x53) && (this.LA(1) != 0x54)) && (this.LA(1) != 0x68))
{
return expression;
}
if (!tokenSet_16_.member(this.LA(2)))
{
return expression;
}
switch (this.LA(1))
{
case 0x54:
token = this.LT(1);
this.match(0x54);
if (base.inputState.guessing == 0)
{
type = 3;
token4 = token;
}
break;
case 0x68:
token2 = this.LT(1);
this.match(0x68);
if (base.inputState.guessing == 0)
{
type = 4;
token4 = token2;
}
break;
case 0x53:
token3 = this.LT(1);
this.match(0x53);
if (base.inputState.guessing == 0)
{
type = 5;
token4 = token3;
}
break;
default:
throw new NoViableAltException(this.LT(1), this.getFilename());
}
Expression expression2 = this.unary_expression();
if (base.inputState.guessing == 0)
{
BinaryExpression expression3 = new BinaryExpression(ToLexicalInfo(token4));
expression3.set_Operator(type);
expression3.set_Left(expression);
expression3.set_Right(expression2);
expression = expression3;
}
}
}
catch (RecognitionException exception)
{
if (base.inputState.guessing != 0)
{
throw;
}
this.reportError(exception);
this.recover(exception, tokenSet_20_);
return expression;
}
return expression;
}
示例6: logical_or
public Expression logical_or()
{
Expression expression = null;
IToken token = null;
try
{
expression = this.logical_and();
while ((this.LA(1) == 0x4b) && tokenSet_16_.member(this.LA(2)))
{
token = this.LT(1);
this.match(0x4b);
Expression expression2 = this.logical_and();
if (base.inputState.guessing == 0)
{
BinaryExpression expression3;
BinaryExpression expression1 = expression3 = new BinaryExpression(ToLexicalInfo(token));
expression3.set_Operator(0x1c);
expression3.set_Left(expression);
expression3.set_Right(expression2);
expression = expression3;
}
}
return expression;
}
catch (RecognitionException exception)
{
if (base.inputState.guessing != 0)
{
throw;
}
this.reportError(exception);
this.recover(exception, tokenSet_20_);
return expression;
}
return expression;
}
示例7: comparison
//.........这里部分代码省略.........
if (base.inputState.guessing == 0)
{
type = 0x1b;
token8 = token;
}
break;
case 0x18:
token2 = this.LT(1);
this.match(0x18);
if (base.inputState.guessing == 0)
{
type = 0x1a;
token8 = token2;
}
break;
case 0x5f:
token3 = this.LT(1);
this.match(0x5f);
if (base.inputState.guessing == 0)
{
type = 9;
token8 = token3;
}
break;
case 0x60:
token4 = this.LT(1);
this.match(0x60);
if (base.inputState.guessing == 0)
{
type = 10;
token8 = token4;
}
break;
case 0x5b:
token5 = this.LT(1);
this.match(0x5b);
if (base.inputState.guessing == 0)
{
type = 7;
token8 = token5;
}
break;
case 0x5c:
token6 = this.LT(1);
this.match(0x5c);
if (base.inputState.guessing == 0)
{
type = 8;
token8 = token6;
}
break;
default:
throw new NoViableAltException(this.LT(1), this.getFilename());
}
expression2 = this.shift();
}
else
{
if (num != 0x1a)
{
throw new NoViableAltException(this.LT(1), this.getFilename());
}
token7 = this.LT(1);
this.match(0x1a);
TypeReference reference = this.type_reference();
if (base.inputState.guessing == 0)
{
type = 0x19;
token8 = token7;
expression2 = new TypeofExpression(reference.get_LexicalInfo(), reference);
}
}
if (base.inputState.guessing == 0)
{
BinaryExpression expression3 = new BinaryExpression(ToLexicalInfo(token8));
expression3.set_Operator(type);
expression3.set_Left(expression);
expression3.set_Right(expression2);
expression = expression3;
}
}
}
catch (RecognitionException exception)
{
if (base.inputState.guessing != 0)
{
throw;
}
this.reportError(exception);
this.recover(exception, tokenSet_20_);
return expression;
}
return expression;
}
示例8: bitwise_or
public Expression bitwise_or()
{
Expression expression = null;
IToken token = null;
try
{
expression = this.bitwise_xor();
while ((this.LA(1) == 70) && tokenSet_16_.member(this.LA(2)))
{
BinaryOperatorType type;
token = this.LT(1);
this.match(70);
if (base.inputState.guessing == 0)
{
type = 30;
}
Expression expression2 = this.bitwise_xor();
if (base.inputState.guessing == 0)
{
BinaryExpression expression3;
BinaryExpression expression1 = expression3 = new BinaryExpression(ToLexicalInfo(token));
expression3.set_Operator(type);
expression3.set_Left(expression);
expression3.set_Right(expression2);
expression = expression3;
}
}
return expression;
}
catch (RecognitionException exception)
{
if (base.inputState.guessing != 0)
{
throw;
}
this.reportError(exception);
this.recover(exception, tokenSet_20_);
return expression;
}
return expression;
}