public typecast_node NewAsIsConstexpr(expression constterm, op_typecast typecastop, type_definition tdef, LexLocation loc)
        {
            var naic = new typecast_node(constterm as addressed_value, tdef, typecastop, loc); 
			if (!(constterm is addressed_value))
                parsertools.errors.Add(new bad_operand_type(parsertools.CurrentFileName, constterm.source_context, naic));
            return naic;
        }
Exemple #2
0
		///<summary>
		///Конструктор с параметрами.
		///</summary>
		public pair_type_stlist(type_definition _tn,statement_list _exprs)
		{
			this._tn=_tn;
			this._exprs=_exprs;
		}
		public void visit(type_definition _type_definition)
		{
			bw.Write((Int16)14);
			write_type_definition(_type_definition);
		}
        public typecast_node NewAsIsExpr(syntax_tree_node term, op_typecast typecast_op, type_definition simple_or_template_type_reference, LexLocation loc)
        {
            var naie = new typecast_node((addressed_value)term, simple_or_template_type_reference, typecast_op, loc); 
			if (!(term is addressed_value))
                parsertools.errors.Add(new bad_operand_type(parsertools.CurrentFileName, term.source_context, naie));
            return naie;
        }
 public static simple_property BuildSimpleReadWriteProperty(ident name, ident field, type_definition type)
 {
     return new simple_property(name, type, new property_accessors(new read_accessor_name(field), new write_accessor_name(field)));
 }
Exemple #6
0
		///<summary>
		///Конструктор с параметрами.
		///</summary>
		public simple_property(ident _property_name,type_definition _property_type,expression _index_expression,property_accessors _accessors,property_array_default _array_default,property_parameter_list _parameter_list,definition_attribute _attr,SourceContext sc)
		{
			this._property_name=_property_name;
			this._property_type=_property_type;
			this._index_expression=_index_expression;
			this._accessors=_accessors;
			this._array_default=_array_default;
			this._parameter_list=_parameter_list;
			this._attr=_attr;
			source_context = sc;
		}
Exemple #7
0
		///<summary>
		///Конструктор с параметрами.
		///</summary>
		public typed_const_definition(ident _const_name,expression _const_value,type_definition _const_type)
		{
			this._const_name=_const_name;
			this._const_value=_const_value;
			this._const_type=_const_type;
		}
Exemple #8
0
		///<summary>
		///Конструктор с параметрами.
		///</summary>
		public typed_const_definition(type_definition _const_type)
		{
			this._const_type=_const_type;
		}
Exemple #9
0
		///<summary>
		///Конструктор с параметрами.
		///</summary>
		public array_type(indexers_types _indexers,type_definition _elements_type)
		{
			this._indexers=_indexers;
			this._elements_type=_elements_type;
		}
Exemple #10
0
		///<summary>
		///Конструктор с параметрами.
		///</summary>
		public ref_type(type_definition_attr_list _attr_list,type_definition _pointed_to,SourceContext sc)
		{
			this._attr_list=_attr_list;
			this._pointed_to=_pointed_to;
			source_context = sc;
		}
Exemple #11
0
		///<summary>
		///Конструктор с параметрами.
		///</summary>
		public ref_type(type_definition_attr_list _attr_list,type_definition _pointed_to)
		{
			this._attr_list=_attr_list;
			this._pointed_to=_pointed_to;
		}
Exemple #12
0
		///<summary>
		///Конструктор с параметрами.
		///</summary>
		public ref_type(type_definition _pointed_to,SourceContext sc)
		{
			this._pointed_to=_pointed_to;
			source_context = sc;
		}
Exemple #13
0
		///<summary>
		///Конструктор с параметрами.
		///</summary>
		public ref_type(type_definition _pointed_to)
		{
			this._pointed_to=_pointed_to;
		}
Exemple #14
0
		///<summary>
		///Конструктор с параметрами.
		///</summary>
		public for_node(ident _loop_variable,expression _initial_value,expression _finish_value,statement _statements,for_cycle_type _cycle_type,expression _increment_value,type_definition _type_name,bool _create_loop_variable,SourceContext sc)
		{
			this._loop_variable=_loop_variable;
			this._initial_value=_initial_value;
			this._finish_value=_finish_value;
			this._statements=_statements;
			this._cycle_type=_cycle_type;
			this._increment_value=_increment_value;
			this._type_name=_type_name;
			this._create_loop_variable=_create_loop_variable;
			source_context = sc;
		}
Exemple #15
0
		///<summary>
		///Конструктор с параметрами.
		///</summary>
		public pair_type_stlist(type_definition _tn,statement_list _exprs,SourceContext sc)
		{
			this._tn=_tn;
			this._exprs=_exprs;
			source_context = sc;
		}
Exemple #16
0
		///<summary>
		///Конструктор с параметрами.
		///</summary>
		public type_declaration(ident _type_name,type_definition _type_def)
		{
			this._type_name=_type_name;
			this._type_def=_type_def;
		}
Exemple #17
0
		///<summary>
		///Конструктор с параметрами.
		///</summary>
		public type_declaration(ident _type_name,type_definition _type_def,SourceContext sc)
		{
			this._type_name=_type_name;
			this._type_def=_type_def;
			source_context = sc;
		}
Exemple #18
0
		///<summary>
		///Конструктор с параметрами.
		///</summary>
		public array_type(type_definition_attr_list _attr_list,indexers_types _indexers,type_definition _elements_type)
		{
			this._attr_list=_attr_list;
			this._indexers=_indexers;
			this._elements_type=_elements_type;
		}
Exemple #19
0
		///<summary>
		///Конструктор с параметрами.
		///</summary>
		public typed_const_definition(type_definition _const_type,SourceContext sc)
		{
			this._const_type=_const_type;
			source_context = sc;
		}
Exemple #20
0
		///<summary>
		///Конструктор с параметрами.
		///</summary>
		public array_type(type_definition_attr_list _attr_list,indexers_types _indexers,type_definition _elements_type,SourceContext sc)
		{
			this._attr_list=_attr_list;
			this._indexers=_indexers;
			this._elements_type=_elements_type;
			source_context = sc;
		}
Exemple #21
0
		///<summary>
		///Конструктор с параметрами.
		///</summary>
		public typed_const_definition(ident _const_name,expression _const_value,type_definition _const_type,SourceContext sc)
		{
			this._const_name=_const_name;
			this._const_value=_const_value;
			this._const_type=_const_type;
			source_context = sc;
		}
Exemple #22
0
		///<summary>
		///Конструктор с параметрами.
		///</summary>
		public typed_parameters(ident_list _idents,type_definition _vars_type,parametr_kind _param_kind,expression _inital_value)
		{
			this._idents=_idents;
			this._vars_type=_vars_type;
			this._param_kind=_param_kind;
			this._inital_value=_inital_value;
		}
Exemple #23
0
 public static procedure_definition BuildShortFuncDefinition(formal_parameters fp, procedure_attributes_list att, method_name name, type_definition result, expression ex, SourceContext headsc)
 {
     var ff = new function_header(fp, att, name, null, result, headsc);
     procedure_definition pd = BuildShortProcFuncDefinition(ff, new assign("Result", ex, ex.source_context));
     return pd;
 }
Exemple #24
0
		///<summary>
		///Конструктор с параметрами.
		///</summary>
		public typed_parameters(ident_list _idents,type_definition _vars_type,parametr_kind _param_kind,expression _inital_value,SourceContext sc)
		{
			this._idents=_idents;
			this._vars_type=_vars_type;
			this._param_kind=_param_kind;
			this._inital_value=_inital_value;
			source_context = sc;
		}
 public for_node NewForStmt(bool opt_var, ident identifier, type_definition for_stmt_decl_or_assign, expression expr1, for_cycle_type fc_type, expression expr2, token_info opt_tk_do, statement stmt, LexLocation loc)
 {
     var nfs = new for_node(identifier, expr1, expr2, stmt, fc_type, null, for_stmt_decl_or_assign, opt_var != false, loc); 
     if (opt_tk_do == null)
     {
         file_position fp = expr2.source_context.end_position;
         syntax_tree_node err_stn = stmt;
         if (err_stn == null)
             err_stn = expr2;
         parsertools.errors.Add(new PABCNETUnexpectedToken(parsertools.CurrentFileName, StringResources.Get("TKDO"), new SourceContext(fp.line_num, fp.column_num + 1, fp.line_num, fp.column_num + 1, 0, 0), err_stn));
     }
     return nfs;
 }
Exemple #26
0
		///<summary>
		///Конструктор с параметрами.
		///</summary>
		public function_header(type_definition _return_type)
		{
			this._return_type=_return_type;
		}
Exemple #27
0
		///<summary>
		///Конструктор с параметрами.
		///</summary>
		public function_header(type_definition _return_type,SourceContext sc)
		{
			this._return_type=_return_type;
			source_context = sc;
		}
Exemple #28
0
		///<summary>
		///Конструктор с параметрами.
		///</summary>
		public function_header(type_definition_attr_list _attr_list,formal_parameters _parameters,procedure_attributes_list _proc_attributes,method_name _name,bool _of_object,bool _class_keyword,ident_list _template_args,where_definition_list _where_defs,type_definition _return_type,SourceContext sc)
		{
			this._attr_list=_attr_list;
			this._parameters=_parameters;
			this._proc_attributes=_proc_attributes;
			this._name=_name;
			this._of_object=_of_object;
			this._class_keyword=_class_keyword;
			this._template_args=_template_args;
			this._where_defs=_where_defs;
			this._return_type=_return_type;
			source_context = sc;
		}
		public void write_type_definition(type_definition _type_definition)
		{
			write_declaration(_type_definition);
			if (_type_definition.attr_list == null)
			{
				bw.Write((byte)0);
			}
			else
			{
				bw.Write((byte)1);
				_type_definition.attr_list.visit(this);
			}
		}
Exemple #30
0
		///<summary>
		///Конструктор с параметрами.
		///</summary>
		public modern_proc_type(type_definition_attr_list _attr_list,type_definition _aloneparam,enumerator_list _el,type_definition _res,SourceContext sc)
		{
			this._attr_list=_attr_list;
			this._aloneparam=_aloneparam;
			this._el=_el;
			this._res=_res;
			source_context = sc;
		}