private void VisitCompiledVariableReference(compiled_variable_reference en) { VisitExpression(en.obj); }
private addressed_expression create_class_field_reference(expression_node en, definition_node dn, SyntaxTree.ident id_right) { try_convert_typed_expression_to_function_call(ref en); if (dn.semantic_node_type == semantic_node_type.class_field) { class_field cf = (class_field)dn; if (cf.polymorphic_state == SemanticTree.polymorphic_state.ps_static) { AddError(new CanNotReferanceToStaticFieldWithExpression(cf, get_location(id_right), en)); } class_field_reference cfr = new class_field_reference(cf, en, get_location(id_right)); //return_value(cfr); return cfr; } if (dn.semantic_node_type == semantic_node_type.compiled_variable_definition) { compiled_variable_definition cfd = (compiled_variable_definition)dn; if (cfd.polymorphic_state == SemanticTree.polymorphic_state.ps_static) { AddError(new CanNotReferanceToStaticFieldWithExpression(cfd, get_location(id_right), en)); } compiled_variable_reference cfr2 = new compiled_variable_reference(cfd, en, get_location(id_right)); //return_value(cfr2); return cfr2; } #if (DEBUG) throw new CompilerInternalError("Invalid variable kind"); #endif return null; }
private void VisitCompiledVariableReference(compiled_variable_reference expr) { VisitExpression(expr.obj); WriteCompiledVariable(expr.var); }
private compiled_variable_reference CreateCompiledVariableReference() { expression_node obj = CreateExpression(); compiled_variable_definition cvd = GetCompiledVariable(br.ReadInt32()); compiled_variable_reference cvr = new compiled_variable_reference(cvd,obj,null); return cvr; }