public convert_types_function_node(compile_time_executor ctn, bool good) { compile_time_executor = ctn; this._good = good; }
private static bool compare_ordinal_type(constant_node left,constant_node right,compile_time_executor cte, location call_location) { expression_node ret_expr=cte(call_location,left,right); if (ret_expr == null) { throw new CompilerInternalError("Expected compile-time executed expression."); } bool_const_node bcn = ret_expr as bool_const_node; if (bcn == null) { throw new CompilerInternalError("Expected bool value."); } return bcn.constant_value; }
private void add_delegate_operator(string name, compile_time_executor executor) { common_namespace_function_node cnfn = new common_namespace_function_node(name, this, null, null, null); cnfn.ConnectedToType = this; cnfn.compile_time_executor = executor; add_name(name, new SymbolInfo(cnfn)); common_parameter cp1 = new common_parameter(compiler_string_consts.left_param_name, this, SemanticTree.parameter_type.value, cnfn, concrete_parameter_type.cpt_none, null, null); common_parameter cp2 = new common_parameter(compiler_string_consts.right_param_name, this, SemanticTree.parameter_type.value, cnfn, concrete_parameter_type.cpt_none, null, null); cnfn.parameters.AddElement(cp1); cnfn.parameters.AddElement(cp2); }