本文整理匯總了C#中PascalABCCompiler.SyntaxTree.expression.GetType方法的典型用法代碼示例。如果您正苦於以下問題:C# expression.GetType方法的具體用法?C# expression.GetType怎麽用?C# expression.GetType使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類PascalABCCompiler.SyntaxTree.expression
的用法示例。
在下文中一共展示了expression.GetType方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: CompareInternal
public void CompareInternal(expression left, expression right)
{
if (left == null && right != null || left != null && right == null)
throw_not_equal(left, right);
if (left != null && right != null)
{
if (left.GetType() != right.GetType())
throw_not_equal(left, right);
/*Type t = left.GetType();
MethodInfo mi = typeof(SyntaxTreeComparer).GetMethod("CompareInternal", new Type[] { t, t });
mi.Invoke(this, new object[] { left, right });*/
if (left is ident)
CompareInternal(left as ident, right as ident);
else if (left is dot_node)
CompareInternal(left as dot_node, right as dot_node);
else if (left is method_call)
CompareInternal(left as method_call, right as method_call);
else if (left is bracket_expr)
CompareInternal(left as bracket_expr, right as bracket_expr);
else if (left is new_expr)
CompareInternal(left as new_expr, right as new_expr);
else if (left is int32_const)
CompareInternal(left as int32_const, right as int32_const);
else if (left is int64_const)
CompareInternal(left as int64_const, right as int64_const);
else if (left is bool_const)
CompareInternal(left as bool_const, right as bool_const);
else if (left is char_const)
CompareInternal(left as char_const, right as char_const);
else if (left is string_const)
CompareInternal(left as string_const, right as string_const);
else if (left is double_const)
CompareInternal(left as double_const, right as double_const);
else if (left is sharp_char_const)
CompareInternal(left as sharp_char_const, right as sharp_char_const);
else if (left is literal_const_line)
CompareInternal(left as literal_const_line, right as literal_const_line);
else if (left is nil_const)
CompareInternal(left as nil_const, right as nil_const);
else if (left is array_const)
CompareInternal(left as array_const, right as array_const);
else if (left is record_const)
CompareInternal(left as record_const, right as record_const);
else if (left is pascal_set_constant)
CompareInternal(left as pascal_set_constant, right as pascal_set_constant);
else if (left is roof_dereference)
CompareInternal(left as roof_dereference, right as roof_dereference);
else if (left is sizeof_operator)
CompareInternal(left as sizeof_operator, right as sizeof_operator);
else if (left is default_operator)
CompareInternal(left as default_operator, right as default_operator);
else if (left is bin_expr)
CompareInternal(left as bin_expr, right as bin_expr);
else if (left is un_expr)
CompareInternal(left as un_expr, right as un_expr);
else if (left is uint64_const)
CompareInternal(left as uint64_const, right as uint64_const);
else if (left is int64_const)
CompareInternal(left as int64_const, right as int64_const);
else if (left is diap_expr)
CompareInternal(left as diap_expr, right as diap_expr);
else if (left is diapason_expr)
CompareInternal(left as diapason_expr, right as diapason_expr);
else if (left is get_address)
CompareInternal(left as get_address, right as get_address);
else if (left is format_expr)
CompareInternal(left as format_expr, right as format_expr);
else if (left is hex_constant)
CompareInternal(left as hex_constant, right as hex_constant);
else if (left is typecast_node)
CompareInternal(left as typecast_node, right as typecast_node);
else if (left is question_colon_expression)
CompareInternal(left as question_colon_expression, right as question_colon_expression);
else if (left is indexer)
CompareInternal(left as indexer, right as indexer);
else if (left is ident_with_templateparams)
CompareInternal(left as ident_with_templateparams, right as ident_with_templateparams);
//else if (left is assign) // SSM 12/06/15
// CompareInternal(left as assign, right as assign);
else if (left is typeof_operator)
CompareInternal(left as typeof_operator, right as typeof_operator);
else if (left is function_lambda_call)
CompareInternal(left as function_lambda_call, right as function_lambda_call);
else if (left is function_lambda_definition)
CompareInternal(left as function_lambda_definition, right as function_lambda_definition);
else
throw new NotImplementedException(left.GetType().ToString());
}
}