private static method_call CreateMethodCall(string methodName, params expression[] exprList) { SyntaxTree.method_call mc = new SyntaxTree.method_call(); mc.dereferencing_value = new ident(methodName); SyntaxTree.expression_list exl = new PascalABCCompiler.SyntaxTree.expression_list(); foreach (expression x in exprList) { exl.Add(x); } mc.parameters = exl; return(mc); }
//private SyntaxTree.uses_list CreateStandartUsesList() //{ // uses_list res = new uses_list(); // unit_or_namespace pabcsystem = new unit_or_namespace(); // pabcsystem.name = new ident_list("PABCSystem"); // res.units.Add(pabcsystem); // return res; //} public procedure_call CreateProcedureCall(string procName, params expression[] exprList) { SyntaxTree.procedure_call pc = new SyntaxTree.procedure_call(); SyntaxTree.method_call mc = new SyntaxTree.method_call(); mc.dereferencing_value = new ident(procName); pc.func_name = mc; SyntaxTree.expression_list exl = new PascalABCCompiler.SyntaxTree.expression_list(); foreach (expression x in exprList) { exl.Add(x); } mc.parameters = exl; return(pc); }
///<summary> ///Конструктор с параметрами. ///</summary> public with_statement(statement _what_do,expression_list _do_with) { this._what_do=_what_do; this._do_with=_do_with; }
///<summary> ///Конструктор с параметрами. ///</summary> public new_expr(type_definition _type,expression_list _params_list,bool _new_array,array_const _array_init_expr,SourceContext sc) { this._type=_type; this._params_list=_params_list; this._new_array=_new_array; this._array_init_expr=_array_init_expr; source_context = sc; }
///<summary> ///Конструктор с параметрами. ///</summary> public inherited_method_call(ident _method_name,expression_list _exprs,SourceContext sc) { this._method_name=_method_name; this._exprs=_exprs; source_context = sc; }
///<summary> ///Конструктор с параметрами. ///</summary> public pascal_set_constant(expression_list _values,SourceContext sc) { this._values=_values; source_context = sc; }
///<summary> ///Конструктор с параметрами. ///</summary> public array_const(expression_list _elements,SourceContext sc) { this._elements=_elements; source_context = sc; }
///<summary> ///Конструктор с параметрами. ///</summary> public method_call(expression_list _parameters,SourceContext sc) { this._parameters=_parameters; source_context = sc; }
///<summary> ///Конструктор с параметрами. ///</summary> public method_call(addressed_value _dereferencing_value,expression_list _parameters,SourceContext sc) { this._dereferencing_value=_dereferencing_value; this._parameters=_parameters; source_context = sc; }
///<summary> ///Конструктор с параметрами. ///</summary> public tuple_node_for_formatter(expression_list _el) { this._el=_el; }
///<summary> ///Конструктор с параметрами. ///</summary> public tuple_node_for_formatter(expression_list _el,SourceContext sc) { this._el=_el; source_context = sc; }
///<summary> ///Конструктор с параметрами. ///</summary> public function_lambda_call(function_lambda_definition _f_lambda_def,expression_list _parameters) { this._f_lambda_def=_f_lambda_def; this._parameters=_parameters; }
///<summary> ///Конструктор с параметрами. ///</summary> public function_lambda_call(function_lambda_definition _f_lambda_def,expression_list _parameters,SourceContext sc) { this._f_lambda_def=_f_lambda_def; this._parameters=_parameters; source_context = sc; }
///<summary> ///Конструктор с параметрами. ///</summary> public function_lambda_definition(ident_list _ident_list,type_definition _return_type,formal_parameters _formal_parameters,statement _proc_body,procedure_definition _proc_definition,expression_list _parameters,string _lambda_name,List<declaration> _defs,LambdaVisitMode _lambda_visit_mode,syntax_tree_node _substituting_node,SourceContext sc) { this._ident_list=_ident_list; this._return_type=_return_type; this._formal_parameters=_formal_parameters; this._proc_body=_proc_body; this._proc_definition=_proc_definition; this._parameters=_parameters; this._lambda_name=_lambda_name; this._defs=_defs; this._lambda_visit_mode=_lambda_visit_mode; this._substituting_node=_substituting_node; source_context = sc; }
///<summary> ///Конструктор с параметрами. ///</summary> public attribute(ident _qualifier,named_type_reference _type,expression_list _arguments,SourceContext sc) { this._qualifier=_qualifier; this._type=_type; this._arguments=_arguments; source_context = sc; }
///<summary> ///Конструктор с параметрами. ///</summary> public attribute(ident _qualifier,named_type_reference _type,expression_list _arguments) { this._qualifier=_qualifier; this._type=_type; this._arguments=_arguments; }
///<summary> ///Конструктор с параметрами. ///</summary> public with_statement(statement _what_do,expression_list _do_with,SourceContext sc) { this._what_do=_what_do; this._do_with=_do_with; source_context = sc; }
///<summary> ///Конструктор с параметрами. ///</summary> public indexer(expression_list _indexes) { this._indexes=_indexes; }
///<summary> ///Конструктор с параметрами. ///</summary> public method_call(expression_list _parameters) { this._parameters=_parameters; }
///<summary> ///Конструктор с параметрами. ///</summary> public indexer(expression_list _indexes,SourceContext sc) { this._indexes=_indexes; source_context = sc; }
///<summary> ///Конструктор с параметрами. ///</summary> public method_call(addressed_value _dereferencing_value,expression_list _parameters) { this._dereferencing_value=_dereferencing_value; this._parameters=_parameters; }
///<summary> ///Конструктор с параметрами. ///</summary> public indexer(addressed_value _dereferencing_value,expression_list _indexes) { this._dereferencing_value=_dereferencing_value; this._indexes=_indexes; }
///<summary> ///Конструктор с параметрами. ///</summary> public pascal_set_constant(expression_list _values) { this._values=_values; }
public function_lambda_call NewFactor(ident func_decl_lambda, expression_list expr_list, LexLocation loc) { var fld = parsertools.find_pascalABC_lambda_name(func_decl_lambda.name); var _expression_list = expr_list; var _lambda_definition = fld; var _lambda_call = new function_lambda_call(_lambda_definition, _expression_list, loc); _lambda_call.source_context = func_decl_lambda.source_context; return _lambda_call; }
///<summary> ///Конструктор с параметрами. ///</summary> public array_const(expression_list _elements) { this._elements=_elements; }
public void visit(expression_list _expression_list) { bw.Write((Int16)25); write_expression_list(_expression_list); }
///<summary> ///Конструктор с параметрами. ///</summary> public indexer(addressed_value _dereferencing_value,expression_list _indexes,SourceContext sc) { this._dereferencing_value=_dereferencing_value; this._indexes=_indexes; source_context = sc; }
///<summary> ///Конструктор с параметрами. ///</summary> public new_expr(type_definition _type,expression_list _params_list,bool _new_array,array_const _array_init_expr) { this._type=_type; this._params_list=_params_list; this._new_array=_new_array; this._array_init_expr=_array_init_expr; }
public override void visit(matching_expression _matching_expression) { SyntaxTree.procedure_call pc = new SyntaxTree.procedure_call(); SyntaxTree.method_call mc = new SyntaxTree.method_call(); dot_node dot = new dot_node(new ident("PABCSystem"), new ident("KV")); mc.dereferencing_value = dot; pc.func_name = mc; pc.source_context = _matching_expression.source_context; SyntaxTree.expression_list exl = new PascalABCCompiler.SyntaxTree.expression_list(); exl.Add(_matching_expression.left); exl.Add(_matching_expression.right); mc.parameters = exl; visit(pc); }
///<summary> ///Конструктор с параметрами. ///</summary> public case_variant(expression_list _conditions,statement _exec_if_true) { this._conditions=_conditions; this._exec_if_true=_exec_if_true; }
public void write_expression_list(expression_list _expression_list) { write_syntax_tree_node(_expression_list); if (_expression_list.expressions == null) { bw.Write((byte)0); } else { bw.Write((byte)1); bw.Write(_expression_list.expressions.Count); for(Int32 ssyy_i = 0; ssyy_i < _expression_list.expressions.Count; ssyy_i++) { if (_expression_list.expressions[ssyy_i] == null) { bw.Write((byte)0); } else { bw.Write((byte)1); _expression_list.expressions[ssyy_i].visit(this); } } } }
///<summary> ///Конструктор с параметрами. ///</summary> public case_variant(expression_list _conditions,statement _exec_if_true,SourceContext sc) { this._conditions=_conditions; this._exec_if_true=_exec_if_true; source_context = sc; }