public static MakeTypesCompatible ( |
||
e1 | ||
e2 | ||
oute1 | ||
oute2 | ||
operation | TokenType | |
return | void |
public Expression Condition(Expression arg1, Expression arg2, Expression arg3, Token start, Token qmark) { var type2 = arg2.Type; var type3 = arg3.Type; TypeAdapter.MakeTypesCompatible(arg2, arg3, out arg2, out arg3, qmark.Type); Wall.Cond(arg1, arg2, arg3, type2, type3, start.Location, qmark.Location); return(Expression.Condition(arg1, arg2, arg3)); }
public Expression Equal(Expression arg1, Expression arg2, Token oper) { var type1 = arg1.Type; var type2 = arg2.Type; TypeAdapter.MakeTypesCompatible(arg1, arg2, out arg1, out arg2, oper.Type); Wall.Eq(arg1, arg2, type1, type2, oper); try { return(Expression.Equal(arg1, arg2)); } catch { throw new ParseErrorException(MakeInvalidTypesError(oper, type1, type2), ExprString, oper.Location); } }