Пример #1
0
 public BoundFunctionDefinition(FunctionSymbol functionSymbol, BoundType returnType, ImmutableArray<BoundVariableDeclaration> parameters, BoundBlock body)
     : base(BoundNodeKind.FunctionDefinition, functionSymbol, parameters)
 {
     ReturnType = returnType;
     Body = body;
 }
 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());
     }
 }
Пример #3
0
 private static Symbol GetSymbol(BoundType expression)
 {
     return expression.TypeSymbol;
 }
Пример #4
0
 public BoundFunctionDeclaration(FunctionSymbol functionSymbol, BoundType returnType, ImmutableArray <BoundVariableDeclaration> parameters)
     : base(BoundNodeKind.FunctionDeclaration, functionSymbol, parameters)
 {
     ReturnType = returnType;
 }