Esempio n. 1
0
 public override void visit(addressed_value _addressed_value)
 {
     throw new NotImplementedException();
 }
Esempio n. 2
0
        public expression NewVariable(addressed_value variable, expression var_specifiers, LexLocation loc)
        {
            if (var_specifiers is dot_node) 
			{
                var dn = (dot_node)var_specifiers;
				dn.left = variable;
			}
			else if (var_specifiers is template_param_list) 
			{
                var tpl = (template_param_list)var_specifiers;
				((dot_node)tpl.dereferencing_value).left = variable;
				parsertools.create_source_context(tpl.dereferencing_value, variable, tpl.dereferencing_value);
			}
			else if (var_specifiers is dereference) 
			{
				((dereference)var_specifiers).dereferencing_value = variable;
			}
			else if (var_specifiers is ident_with_templateparams) 
			{
                ((ident_with_templateparams)var_specifiers).name = (addressed_value_funcname)variable;
			}
            var_specifiers.source_context = loc;
            return var_specifiers;
        }
		public void visit(addressed_value _addressed_value)
		{
			bw.Write((Int16)13);
			write_addressed_value(_addressed_value);
		}
Esempio n. 4
0
		///<summary>
		///Конструктор с параметрами.
		///</summary>
		public dot_node(addressed_value _left,addressed_value _right,SourceContext sc)
		{
			this._left=_left;
			this._right=_right;
			source_context = sc;
		}
Esempio n. 5
0
		///<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;
		}
Esempio n. 6
0
		///<summary>
		///Конструктор с параметрами.
		///</summary>
		public assign(addressed_value _to,expression _from,Operators _operator_type,SourceContext sc)
		{
			this._to=_to;
			this._from=_from;
			this._operator_type=_operator_type;
			source_context = sc;
		}
Esempio n. 7
0
		///<summary>
		///Конструктор с параметрами.
		///</summary>
		public get_address(addressed_value _address_of,SourceContext sc)
		{
			this._address_of=_address_of;
			source_context = sc;
		}
Esempio n. 8
0
		///<summary>
		///Конструктор с параметрами.
		///</summary>
		public template_param_list(addressed_value _dereferencing_value,List<type_definition> _params_list,SourceContext sc)
		{
			this._dereferencing_value=_dereferencing_value;
			this._params_list=_params_list;
			source_context = sc;
		}
Esempio n. 9
0
		///<summary>
		///Конструктор с параметрами.
		///</summary>
		public ident_with_templateparams(addressed_value _name,template_param_list _template_params)
		{
			this._name=_name;
			this._template_params=_template_params;
		}
Esempio n. 10
0
		///<summary>
		///Конструктор с параметрами.
		///</summary>
		public typecast_node(addressed_value _expr,type_definition _type_def,op_typecast _cast_op,SourceContext sc)
		{
			this._expr=_expr;
			this._type_def=_type_def;
			this._cast_op=_cast_op;
			source_context = sc;
		}
Esempio n. 11
0
		///<summary>
		///Конструктор с параметрами.
		///</summary>
		public template_param_list(addressed_value _dereferencing_value,List<type_definition> _params_list)
		{
			this._dereferencing_value=_dereferencing_value;
			this._params_list=_params_list;
		}
Esempio n. 12
0
		///<summary>
		///Конструктор с параметрами.
		///</summary>
		public typecast_node(addressed_value _expr,type_definition _type_def,op_typecast _cast_op)
		{
			this._expr=_expr;
			this._type_def=_type_def;
			this._cast_op=_cast_op;
		}
Esempio n. 13
0
		///<summary>
		///Конструктор с параметрами.
		///</summary>
		public procedure_call(addressed_value _func_name,SourceContext sc)
		{
			this._func_name=_func_name;
			source_context = sc;
		}
Esempio n. 14
0
		///<summary>
		///Конструктор с параметрами.
		///</summary>
		public procedure_call(addressed_value _func_name)
		{
			this._func_name=_func_name;
		}
Esempio n. 15
0
		///<summary>
		///Конструктор с параметрами.
		///</summary>
		public indexer(addressed_value _dereferencing_value,expression_list _indexes,SourceContext sc)
		{
			this._dereferencing_value=_dereferencing_value;
			this._indexes=_indexes;
			source_context = sc;
		}
Esempio n. 16
0
		///<summary>
		///Конструктор с параметрами.
		///</summary>
		public ident_with_templateparams(addressed_value _name,template_param_list _template_params,SourceContext sc)
		{
			this._name=_name;
			this._template_params=_template_params;
			source_context = sc;
		}
Esempio n. 17
0
		///<summary>
		///Конструктор с параметрами.
		///</summary>
		public assign(addressed_value _to,expression _from,Operators _operator_type)
		{
			this._to=_to;
			this._from=_from;
			this._operator_type=_operator_type;
		}
Esempio n. 18
0
		public addressed_value_list(addressed_value av)
		{
			variables.Add(av);
		}
Esempio n. 19
0
		///<summary>
		///Конструктор с параметрами.
		///</summary>
		public get_address(addressed_value _address_of)
		{
			this._address_of=_address_of;
		}
Esempio n. 20
0
		public addressed_value_list(addressed_value av, SourceContext sc)
		{
			variables.Add(av);
			source_context = sc;
		}
Esempio n. 21
0
		///<summary>
		///Конструктор с параметрами.
		///</summary>
		public dot_node(addressed_value _left,addressed_value _right)
		{
			this._left=_left;
			this._right=_right;
		}
Esempio n. 22
0
		public void Add(addressed_value av)
		{
			variables.Add(av);
		}
Esempio n. 23
0
		///<summary>
		///Конструктор с параметрами.
		///</summary>
		public method_call(addressed_value _dereferencing_value,expression_list _parameters)
		{
			this._dereferencing_value=_dereferencing_value;
			this._parameters=_parameters;
		}
Esempio n. 24
0
		///<summary>
		///Конструктор с параметрами.
		///</summary>
		public dereference(addressed_value _dereferencing_value)
		{
			this._dereferencing_value=_dereferencing_value;
		}
Esempio n. 25
0
        public addressed_value NewVarReference(get_address var_address, addressed_value variable, LexLocation loc)
        {
            var_address.address_of = variable;
			parsertools.create_source_context(parsertools.NodesStack.Peek(),parsertools.NodesStack.Peek(), variable);
			return (addressed_value)parsertools.NodesStack.Pop();
        }
Esempio n. 26
0
		///<summary>
		///Конструктор с параметрами.
		///</summary>
		public dereference(addressed_value _dereferencing_value,SourceContext sc)
		{
			this._dereferencing_value=_dereferencing_value;
			source_context = sc;
		}
        private void dot_node_as_expression_dot_ident(expression_node en, SyntaxTree.ident id_right, motivation mot, addressed_value syntax_node)
        {
            if (en is typed_expression)
                try_convert_typed_expression_to_function_call(ref en);
            SymbolInfo si = en.type.find_in_type(id_right.name, context.CurrentScope);
            if (si == null)
            {
                AddError(new MemberIsNotDeclaredInType(id_right, get_location(id_right), en.type));
            }

            try_convert_typed_expression_to_function_call(ref en);

            /*
            if (en.semantic_node_type == semantic_node_type.typed_expression)
            {
                type_node tn11=en.type;
                delegated_methods dm11=tn11 as delegated_methods;
                if (dm11!=null)
                {
                    en = dm11.empty_param_method;
                }
            }
            */

            switch (mot)
            {
                case motivation.address_reciving:
                    {
                        return_addressed_value(address_expression_reciving(id_right, si, en));
                        return;
                    }
                case motivation.expression_evaluation:
                    {
                        //en = expression_value_reciving(id_right, si, en, true);
            			//try_convert_typed_expression_to_function_call(ref en);
            			//return_value(en);
                        if (si.sym_info is function_node && (si.sym_info as function_node).is_extension_method)
                        {
                            dot_node dnode = new dot_node(syntax_node, id_right);
                            method_call mc = new method_call(dnode, new expression_list());
                            mc.visit(this);
                            return;
                        }
                        return_value(expression_value_reciving(id_right, si, en, true));
                        return;
                    }
                case motivation.semantic_node_reciving:
                    {
                        return_semantic_value(expression_value_reciving(id_right, si, en, true));
                        return;
                    }
            }
            throw new CompilerInternalError("Invalid motivation.");
        }
Esempio n. 28
0
		///<summary>
		///Конструктор с параметрами.
		///</summary>
		public indexer(addressed_value _dereferencing_value,expression_list _indexes)
		{
			this._dereferencing_value=_dereferencing_value;
			this._indexes=_indexes;
		}
		public void write_addressed_value(addressed_value _addressed_value)
		{
			write_expression(_addressed_value);
		}
 public override void visit(addressed_value _addressed_value)
 {
     throw new Exception("The method or operation is not implemented.");
 }