private void VisitStaticCompiledVariableReference(static_compiled_variable_reference expr) { WriteCompiledVariable(expr.var); }
public compiled_static_field_reference_as_constant(static_compiled_variable_reference field_reference, location loc) : base(field_reference.type, loc) { _field_reference = field_reference; }
private addressed_expression create_class_static_field_reference(type_node tn, definition_node dn, SyntaxTree.ident id_right) { switch (dn.semantic_node_type) { case semantic_node_type.class_field: { class_field cf = (class_field)dn; if (cf.polymorphic_state != SemanticTree.polymorphic_state.ps_static) { AddError(new CanNotReferenceToNonStaticFieldWithType(cf, get_location(id_right), tn)); } static_class_field_reference scfr = new static_class_field_reference(cf, get_location(id_right)); return scfr; } case semantic_node_type.compiled_variable_definition: { compiled_variable_definition cvd = (compiled_variable_definition)dn; if (cvd.polymorphic_state != SemanticTree.polymorphic_state.ps_static) { AddError(new CanNotReferenceToNonStaticFieldWithType(cvd, get_location(id_right), tn)); } static_compiled_variable_reference scvr = new static_compiled_variable_reference(cvd, get_location(id_right)); return scvr; } } throw new CompilerInternalError("Error in create static class field reference."); }
private static_compiled_variable_reference CreateStaticCompiledVariableReference() { compiled_variable_definition cvd = GetCompiledVariable(br.ReadInt32()); static_compiled_variable_reference scvr = new static_compiled_variable_reference(cvd,null); return scvr; }