import { createGrammarConfig } from "./lib-languages-grammar-config.js";
import { createCompletionParser } from "./lib-parser-completion-parser-builder.js";
import { createLangiumParser } from "./lib-parser-langium-parser-builder.js";
import { DefaultTokenBuilder } from "./lib-parser-token-builder.js";
import { DefaultValueConverter } from "./lib-parser-value-converter.js";
import { DefaultLinker } from "./lib-references-linker.js";
import { DefaultNameProvider } from "./lib-references-name-provider.js";
import { DefaultReferences } from "./lib-references-references.js";
import { DefaultScopeComputation } from "./lib-references-scope-computation.js";
import { DefaultScopeProvider } from "./lib-references-scope-provider.js";
import { DefaultJsonSerializer } from "./lib-serializer-json-serializer.js";
import { DefaultServiceRegistry } from "./lib-service-registry.js";
import { DefaultDocumentValidator } from "./lib-validation-document-validator.js";
import { ValidationRegistry } from "./lib-validation-validation-registry.js";
import { DefaultReferenceDescriptionProvider, DefaultAstNodeDescriptionProvider } from "./lib-workspace-ast-descriptions.js";
import { DefaultAstNodeLocator } from "./lib-workspace-ast-node-locator.js";
import { DefaultConfigurationProvider } from "./lib-workspace-configuration.js";
import { DefaultDocumentBuilder } from "./lib-workspace-document-builder.js";
import { DefaultLangiumDocumentFactory, DefaultLangiumDocuments } from "./lib-workspace-documents.js";
import { DefaultIndexManager } from "./lib-workspace-index-manager.js";
import { DefaultWorkspaceManager } from "./lib-workspace-workspace-manager.js";
import { DefaultLexerErrorMessageProvider, DefaultLexer } from "./lib-parser-lexer.js";
import { JSDocDocumentationProvider } from "./lib-documentation-documentation-provider.js";
import { DefaultCommentProvider } from "./lib-documentation-comment-provider.js";
import { LangiumParserErrorMessageProvider } from "./lib-parser-langium-parser.js";
import { DefaultAsyncParser } from "./lib-parser-async-parser.js";
import { DefaultWorkspaceLock } from "./lib-workspace-workspace-lock.js";
import { DefaultHydrator } from "./lib-serializer-hydrator.js";
function createDefaultCoreModule(context) {
  return {
    documentation: {
      CommentProvider: (services) => new DefaultCommentProvider(services),
      DocumentationProvider: (services) => new JSDocDocumentationProvider(services)
    },
    parser: {
      AsyncParser: (services) => new DefaultAsyncParser(services),
      GrammarConfig: (services) => createGrammarConfig(services),
      LangiumParser: (services) => createLangiumParser(services),
      CompletionParser: (services) => createCompletionParser(services),
      ValueConverter: () => new DefaultValueConverter(),
      TokenBuilder: () => new DefaultTokenBuilder(),
      Lexer: (services) => new DefaultLexer(services),
      ParserErrorMessageProvider: () => new LangiumParserErrorMessageProvider(),
      LexerErrorMessageProvider: () => new DefaultLexerErrorMessageProvider()
    },
    workspace: {
      AstNodeLocator: () => new DefaultAstNodeLocator(),
      AstNodeDescriptionProvider: (services) => new DefaultAstNodeDescriptionProvider(services),
      ReferenceDescriptionProvider: (services) => new DefaultReferenceDescriptionProvider(services)
    },
    references: {
      Linker: (services) => new DefaultLinker(services),
      NameProvider: () => new DefaultNameProvider(),
      ScopeProvider: (services) => new DefaultScopeProvider(services),
      ScopeComputation: (services) => new DefaultScopeComputation(services),
      References: (services) => new DefaultReferences(services)
    },
    serializer: {
      Hydrator: (services) => new DefaultHydrator(services),
      JsonSerializer: (services) => new DefaultJsonSerializer(services)
    },
    validation: {
      DocumentValidator: (services) => new DefaultDocumentValidator(services),
      ValidationRegistry: (services) => new ValidationRegistry(services)
    },
    shared: () => context.shared
  };
}
function createDefaultSharedCoreModule(context) {
  return {
    ServiceRegistry: (services) => new DefaultServiceRegistry(services),
    workspace: {
      LangiumDocuments: (services) => new DefaultLangiumDocuments(services),
      LangiumDocumentFactory: (services) => new DefaultLangiumDocumentFactory(services),
      DocumentBuilder: (services) => new DefaultDocumentBuilder(services),
      IndexManager: (services) => new DefaultIndexManager(services),
      WorkspaceManager: (services) => new DefaultWorkspaceManager(services),
      FileSystemProvider: (services) => context.fileSystemProvider(services),
      WorkspaceLock: () => new DefaultWorkspaceLock(),
      ConfigurationProvider: (services) => new DefaultConfigurationProvider(services)
    }
  };
}
export {
  createDefaultCoreModule,
  createDefaultSharedCoreModule
};
//# sourceMappingURL=lib-default-module.js.map
