public virtual void VisitTypeRef(BoundTypeRef x) { if (x != null) { Accept(x.TypeExpression); } }
internal static ImmutableArray <BoundTypeRef> Flattern(BoundTypeRef tref) { if (tref is BoundMultipleTypeRef mtref) { return(mtref.BoundTypes); } else { return(ImmutableArray.Create(tref)); } }
BoundTypeRef BindTypeRef(AST.TypeRef tref) { var bound = new BoundTypeRef(tref); if (tref is AST.IndirectTypeRef) { bound.TypeExpression = BindExpression(((AST.IndirectTypeRef)tref).ClassNameVar); } return(bound); }
public BoundNewEx(BoundTypeRef tref, ImmutableArray <BoundArgument> arguments) : base(arguments) { _typeref = tref; }
public BoundStaticFunctionCall(BoundTypeRef typeRef, BoundRoutineName name, ImmutableArray <BoundArgument> arguments) : base(arguments) { _typeRef = typeRef; _name = name; }
public static BoundFieldRef CreateClassConst(BoundTypeRef parent, BoundVariableName name) => new BoundFieldRef() { _parentType = parent, _fieldName = name, _type = FieldType.ClassConstant };
public static BoundFieldRef CreateStaticField(BoundTypeRef parent, BoundVariableName name) => new BoundFieldRef() { _parentType = parent, _fieldName = name, _type = FieldType.StaticField };
public virtual TResult VisitTypeRef(BoundTypeRef x) => DefaultVisitType(x);
protected virtual TResult DefaultVisitType(BoundTypeRef x) => default;
public override void VisitTypeRef(BoundTypeRef tref) { if (tref == null) return; if (tref.TypeRef is INamedTypeRef) { var qname = ((INamedTypeRef)tref.TypeRef).ClassName; if (qname.IsReservedClassName) { if (qname.IsSelfClassName) { tref.ResolvedType = TypeCtx.ContainingType ?? new MissingMetadataTypeSymbol(qname.ToString(), 0, false); } else if (qname.IsParentClassName) { tref.ResolvedType = TypeCtx.ContainingType?.BaseType ?? new MissingMetadataTypeSymbol(qname.ToString(), 0, false); } else if (qname.IsStaticClassName) { this.Routine.Flags |= RoutineFlags.UsesLateStatic; throw new NotImplementedException("Late static bound type."); } } else { tref.ResolvedType = (TypeSymbol)_model.GetType(qname); } } Accept(tref.TypeExpression); }
public ITypeSymbol EmitLoadTypeInfo(CodeGenerator cg, bool throwOnError = false) => BoundTypeRef.EmitLoadPhpTypeInfo(cg, _symbol);
public BoundIndirectStFieldPlace(BoundTypeRef typeref, BoundVariableName fldname, BoundFieldRef boundref) { _type = typeref; _name = fldname; _boundref = boundref; }
public virtual void VisitTypeRef(BoundTypeRef x) { Accept(x.TypeExpression); }
public override BoundOperation VisitTypeRef(BoundTypeRef x) { // TODO return(default);
public virtual TResult VisitTypeRef(BoundTypeRef x) => DefaultVisitOperation(x);
internal virtual TResult VisitTypeRef(BoundTypeRef x) => DefaultVisitOperation(x);
public BoundTypeRef BindTypeRef(AST.TypeRef tref) { var bound = new BoundTypeRef(tref); if (tref is AST.IndirectTypeRef) { bound.TypeExpression = BindExpression(((AST.IndirectTypeRef)tref).ClassNameVar); } return bound; }