本文整理汇总了C#中expressions_list.clear方法的典型用法代码示例。如果您正苦于以下问题:C# expressions_list.clear方法的具体用法?C# expressions_list.clear怎么用?C# expressions_list.clear使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类expressions_list
的用法示例。
在下文中一共展示了expressions_list.clear方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: make_read_call
private expression_node make_read_call(SymbolInfo si, SyntaxTree.expression_list parameters, location loc)
{
// вызов read(a,b,c) разбивается на несколько вызовов, последний возвращается узлом, а остальные добавляются здесь в теле expressions_list exl = new expressions_list();
expression_node last_call = null;
expressions_list exl = new expressions_list();
expression_node file = null;
bool read_from_file = false;
bool read_from_text_file = false;
bool read_from_typed_file = false;
bool read_from_binary_file = false;
bool readln_string_file = false;
if (parameters != null) // если список параметров не пуст
{
if (parameters.expressions.Count >= 1)
{
expression_node param0 = convert_strong(parameters.expressions[0]);
if (param0.type != null)
{
if (SystemLibrary.SystemLibInitializer.TextFileType.Found && param0.type == SystemLibrary.SystemLibInitializer.TextFileType.sym_info)
{
file = param0;
read_from_text_file = true;
}
if (param0.type.type_special_kind == SemanticTree.type_special_kind.typed_file
&& parameters.expressions.Count > 1 //это можно внести во внутрь
)//и побросать приличные исключения
{
if (!SystemLibrary.SystemLibInitializer.read_procedure.FromDll)
{
if (si == SystemLibrary.SystemLibInitializer.read_procedure.SymbolInfo)
{
file = param0;
read_from_typed_file = true;
}
}
else if (SystemLibrary.SystemLibInitializer.read_procedure.Equal(si))
{
file = param0;
read_from_typed_file = true;
}
}
if (param0.type.type_special_kind == SemanticTree.type_special_kind.binary_file
&& parameters.expressions.Count > 1 //это можно внести во внутрь
)//и побросать приличные исключения
{
if (!SystemLibrary.SystemLibInitializer.read_procedure.FromDll)
{
if (si == SystemLibrary.SystemLibInitializer.read_procedure.SymbolInfo)
{
file = param0;
read_from_binary_file = true;
}
}
else if (SystemLibrary.SystemLibInitializer.read_procedure.Equal(si))
{
file = param0;
read_from_binary_file = true;
}
}
}
read_from_file = read_from_text_file || read_from_typed_file || read_from_binary_file;
}
bool first_iteration = true;
foreach (SyntaxTree.expression ex in parameters.expressions)
{
if (first_iteration && read_from_file)
{
first_iteration = false;
continue;
}
if (last_call != null && convertion_data_and_alghoritms.statement_list_stack.size > 0)
convertion_data_and_alghoritms.statement_list_stack.top().statements.AddElement(last_call);
expression_node en = convert_strong(ex);
check_on_loop_variable(en);
//if (en.type == null)
//throw new CanNotRead(en.location);
exl.clear();
if (read_from_file)
exl.AddElement(file);
if (read_from_typed_file)
{
if (SystemLibrary.SystemLibInitializer.TypedFileReadProcedure == null)
AddError(new NotSupportedError(loc));
if (en.type != file.type.element_type)
AddError(new ExpectedExprHaveTypeTypedFile(file.type.element_type, en.type, true, get_location(ex)));
bool is_char_getter = false;
if (!en.is_addressed)
{
if (en is compiled_function_call)
{
compiled_function_call cfc = en as compiled_function_call;
if ((cfc.function_node.return_value_type == SystemLibrary.SystemLibrary.char_type && cfc.function_node.cont_type == SystemLibrary.SystemLibrary.string_type
&& cfc.function_node == cfc.function_node.cont_type.default_property_node.get_function))
{
en = new simple_array_indexing((en as compiled_function_call).obj, (en as compiled_function_call).parameters[0], SystemLibrary.SystemLibrary.char_type, en.location);
is_char_getter = true;
}
//.........这里部分代码省略.........