本文整理汇总了C#中PascalABCCompiler.TreeRealization.type_node.add_name方法的典型用法代码示例。如果您正苦于以下问题:C# type_node.add_name方法的具体用法?C# type_node.add_name怎么用?C# type_node.add_name使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PascalABCCompiler.TreeRealization.type_node
的用法示例。
在下文中一共展示了type_node.add_name方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: add_function_to_type
public static void add_function_to_type(string oper_name, type_node to, function_node fn)
{
to.add_name(oper_name, new SymbolInfo(fn));
}
示例2: make_unary_empty_operator
public static basic_function_node make_unary_empty_operator(string operator_name, type_node to,
type_node ret_value_type)
{
basic_function_node bfn = create_emty_function(ret_value_type, operator_name);
to.add_name(operator_name,new SymbolInfo(bfn));
return bfn;
}
示例3: make_unary_operator
public static basic_function_node make_unary_operator(string operator_name, type_node to,
SemanticTree.basic_function_type bft, type_node ret_value_type)
{
basic_function_node bfn = new basic_function_node(bft, ret_value_type,true);
basic_parameter par = new basic_parameter(compiler_string_consts.unary_param_name, to,
SemanticTree.parameter_type.value, bfn);
bfn.parameters.AddElement(par);
to.add_name(operator_name, new SymbolInfo(bfn));
add_stand_type(bft, bfn);
return bfn;
}
示例4: make_common_binary_operation
public static basic_function_node make_common_binary_operation(string operator_name,
type_node def_type,type_node left,type_node right,
SemanticTree.basic_function_type bft,type_node ret_value_type)
{
basic_function_node bfn = new basic_function_node(bft, ret_value_type,true,operator_name);
basic_parameter par_left = new basic_parameter(compiler_string_consts.left_param_name, left,
SemanticTree.parameter_type.value, bfn);
basic_parameter par_right = new basic_parameter(compiler_string_consts.right_param_name, right,
SemanticTree.parameter_type.value, bfn);
bfn.parameters.AddElement(par_left);
bfn.parameters.AddElement(par_right);
def_type.add_name(operator_name, new SymbolInfo(bfn));
add_stand_type(bft, bfn);
return bfn;
}
示例5: make_object_operator
private static basic_function_node make_object_operator(type_node ctn, SemanticTree.basic_function_type bas_ft,
string name, type_node ret_type, SemanticTree.parameter_type first_parameter_type)
{
basic_function_node bfn = new basic_function_node(bas_ft, ret_type,true,name);
basic_parameter to = new basic_parameter(compiler_string_consts.left_param_name, ctn,
first_parameter_type, bfn);
basic_parameter from = new basic_parameter(compiler_string_consts.right_param_name, ctn,
SemanticTree.parameter_type.value, bfn);
bfn.parameters.AddElement(to);
bfn.parameters.AddElement(from);
ctn.add_name(name, new SymbolInfo(bfn));
add_stand_type(bas_ft, bfn);
return bfn;
}
示例6: AddTypeToShortStringTypeList
public static void AddTypeToShortStringTypeList(type_node tn)
{
instance.ShortStringTypes.Add((tn as short_string_type_node).Length,tn as short_string_type_node);
tn.add_name(compiler_string_consts.plus_name,new SymbolInfo(SystemLibrary.SystemLibrary.string_add));
}