private Symbol?ProcessTopLevelDeclaration(ModuleSymbol moduleSymbol, TopLevelDecl topLevelDeclaration) { _cancellationToken.ThrowIfCancellationRequested(); switch (topLevelDeclaration) { case ClassDecl classDeclaration: return(ProcessClass(moduleSymbol, classDeclaration)); case LiteralModuleDecl literalModuleDeclaration: return(ProcessModule(moduleSymbol, literalModuleDeclaration.ModuleDef)); case ValuetypeDecl valueTypeDeclaration: return(ProcessValueType(moduleSymbol, valueTypeDeclaration)); default: _logger.LogWarning("encountered unknown top level declaration {} of type {}", topLevelDeclaration.Name, topLevelDeclaration.GetType()); return(null); } }
private Symbol?ProcessTopLevelDeclaration(ModuleSymbol moduleSymbol, TopLevelDecl topLevelDeclaration) { switch (topLevelDeclaration) { case ClassDecl classDeclaration: return(ProcessClass(moduleSymbol, classDeclaration)); case LiteralModuleDecl literalModuleDeclaration: return(ProcessModule(moduleSymbol, literalModuleDeclaration.ModuleDef)); case ValuetypeDecl valueTypeDeclaration: return(ProcessValueType(moduleSymbol, valueTypeDeclaration)); case DatatypeDecl dataTypeDeclaration: return(ProcessDataType(moduleSymbol, dataTypeDeclaration)); default: logger.LogDebug("encountered unknown top level declaration {Name} of type {Type}", topLevelDeclaration.Name, topLevelDeclaration.GetType()); return(null); } }