本文整理汇总了C#中PascalABCCompiler.TreeRealization.type_node.add_internal_interface方法的典型用法代码示例。如果您正苦于以下问题:C# type_node.add_internal_interface方法的具体用法?C# type_node.add_internal_interface怎么用?C# type_node.add_internal_interface使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PascalABCCompiler.TreeRealization.type_node
的用法示例。
在下文中一共展示了type_node.add_internal_interface方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: mark_byte_as_ordinal
/*
private static void mark_byte_as_ordinal()
{
basic_function_node inc_value_method = create_inc_value_method(SemanticTree.basic_function_type.binc, _byte_type);
basic_function_node dec_value_method = create_dec_value_method(SemanticTree.basic_function_type.bdec, _byte_type);
basic_function_node inc_method = create_inc_method(SemanticTree.basic_function_type.binc, _byte_type);
basic_function_node dec_method = create_dec_method(SemanticTree.basic_function_type.bdec, _byte_type);
SymbolInfo si = _byte_type.find_in_type(compiler_string_consts.greq_name);
basic_function_node greq = (basic_function_node)si.sym_info;
si = _byte_type.find(compiler_string_consts.smeq_name);
basic_function_node loeq = (basic_function_node)si.sym_info;
constant_node cn_max = new byte_const_node(byte.MaxValue, null);
constant_node cn_min = new byte_const_node(byte.MinValue, null);
basic_function_node i2i_method = create_emty_function(byte_type);
ordinal_type_to_int ordinal_type_to_int = byte_to_int;
ordinal_type_interface oti = new ordinal_type_interface(inc_method, dec_method, inc_value_method, dec_value_method,
internal_inc_value, internal_dec_value, loeq, greq, cn_min, cn_max, i2i_method, ordinal_type_to_int);
_byte_type.add_internal_interface(oti);
}
*/
private static void mark_type_as_ordinal(type_node type,
SemanticTree.basic_function_type inc,SemanticTree.basic_function_type dec,
SemanticTree.basic_function_type vinc, SemanticTree.basic_function_type vdec,
constant_node lower_value, constant_node upper_value,
function_node t2i,ordinal_type_to_int t2i_comp)
{
basic_function_node inc_value = create_oti_method(inc, type, SemanticTree.parameter_type.value);
basic_function_node dec_value = create_oti_method(dec, type, SemanticTree.parameter_type.value);
basic_function_node inc_var = create_oti_method(vinc, type, SemanticTree.parameter_type.var);
basic_function_node dec_var = create_oti_method(vdec, type, SemanticTree.parameter_type.var);
SymbolInfo si = type.find_in_type(compiler_string_consts.greq_name);
basic_function_node greq = (basic_function_node)si.sym_info;
si = type.find(compiler_string_consts.smeq_name);
basic_function_node loeq = (basic_function_node)si.sym_info;
si = type.find(compiler_string_consts.sm_name);
basic_function_node lo = (basic_function_node)si.sym_info;
si = type.find(compiler_string_consts.gr_name);
basic_function_node gr = (basic_function_node)si.sym_info;
ordinal_type_interface oti = new ordinal_type_interface(inc_value, dec_value, inc_var, dec_var,
loeq, greq, lo, gr, lower_value, upper_value, t2i, t2i_comp);
type.add_internal_interface(oti);
}