private static Symbol GetSymbol(BoundType expression) { return expression.TypeSymbol; }
public BoundFunctionDeclaration(FunctionSymbol functionSymbol, BoundType returnType, ImmutableArray<BoundVariableDeclaration> parameters) : base(BoundNodeKind.FunctionDeclaration, functionSymbol, parameters) { ReturnType = returnType; }
protected virtual void VisitType(BoundType node) { switch (node.Kind) { case BoundNodeKind.StructType: VisitStructType((BoundStructType) node); break; case BoundNodeKind.ClassType: VisitClassType((BoundClassType) node); break; case BoundNodeKind.InterfaceType: VisitInterfaceType((BoundInterfaceType) node); break; default: throw new InvalidOperationException(node.Kind.ToString()); } }
public BoundFunctionDefinition(FunctionSymbol functionSymbol, BoundType returnType, ImmutableArray <BoundVariableDeclaration> parameters, BoundBlock body) : base(BoundNodeKind.FunctionDefinition, functionSymbol, parameters) { ReturnType = returnType; Body = body; }