This commit is contained in:
Бондарев Иван 2016-08-03 20:33:50 +02:00
parent 5ec147a460
commit 1d6dfe245a
2 changed files with 13 additions and 3 deletions

View file

@ -111,6 +111,12 @@ namespace CodeCompletion
if (ext_syms != null)
lst.AddRange(ext_syms);
RestoreCurrentUsedAssemblies();
List<SymInfo> lst_to_remove = new List<SymInfo>();
foreach (SymInfo si2 in lst)
if (si2.name.StartsWith("operator"))
lst_to_remove.Add(si2);
foreach (SymInfo si2 in lst_to_remove)
lst.Remove(si2);
return lst.ToArray();
}
else

View file

@ -2935,9 +2935,12 @@ namespace PascalABCCompiler.TreeRealization
basic_function_node _int_and = SystemLibrary.SystemLibrary.make_binary_operator(compiler_string_consts.and_name, ctn, SemanticTree.basic_function_type.iand);
basic_function_node _int_or = SystemLibrary.SystemLibrary.make_binary_operator(compiler_string_consts.or_name, ctn, SemanticTree.basic_function_type.ior);
basic_function_node _int_xor = SystemLibrary.SystemLibrary.make_binary_operator(compiler_string_consts.xor_name, ctn, SemanticTree.basic_function_type.ixor);
ctn.scope.AddSymbol(compiler_string_consts.and_name, new SymbolInfo(_int_and));
ctn.scope.AddSymbol(compiler_string_consts.or_name, new SymbolInfo(_int_or));
ctn.scope.AddSymbol(compiler_string_consts.xor_name, new SymbolInfo(_int_xor));
if (ctn.scope != null)
{
ctn.scope.AddSymbol(compiler_string_consts.and_name, new SymbolInfo(_int_and));
ctn.scope.AddSymbol(compiler_string_consts.or_name, new SymbolInfo(_int_or));
ctn.scope.AddSymbol(compiler_string_consts.xor_name, new SymbolInfo(_int_xor));
}
}
public void reinit_scope()
@ -3005,6 +3008,7 @@ namespace PascalABCCompiler.TreeRealization
SystemLibrary.SystemLibrary.make_binary_operator(compiler_string_consts.greq_name, ctn, SemanticTree.basic_function_type.enumgreq, SystemLibrary.SystemLibrary.bool_type);
SystemLibrary.SystemLibrary.make_binary_operator(compiler_string_consts.sm_name, ctn, SemanticTree.basic_function_type.enumsm, SystemLibrary.SystemLibrary.bool_type);
SystemLibrary.SystemLibrary.make_binary_operator(compiler_string_consts.smeq_name, ctn, SemanticTree.basic_function_type.enumsmeq, SystemLibrary.SystemLibrary.bool_type);
InitEnumOperations(ctn);
}
//ctn.init_scope();
//TODO: Тут надо подумать. Может как-то сделать по другому?