createLangiumGrammarServices( context: DefaultSharedModuleContext, sharedModule?: Module< LangiumSharedServices, { AstReflection?: { getAllSubTypes?: (type: string) => string[]; getAllTypes?: () => string[]; getReferenceType?: (refInfo: ReferenceInfo) => string; getTypeMetaData?: (type: string) => TypeMetaData; isInstance?: (node: unknown, type: string) => boolean; isSubtype?: (subtype: string, supertype: string) => boolean; types?: { [key: string]: | undefined | { name?: string; properties?: { [key: ...
]: ...
}; superTypes?: (...)
[]; }; }; }; lsp?: { Connection?: Connection; DocumentUpdateHandler?: { didChangeContent?: ( event: TextDocumentChangeEvent<TextDocument>, ) => void; didChangeWatchedFiles?: (params: DidChangeWatchedFilesParams) => void; didCloseDocument?: ( event: TextDocumentChangeEvent<TextDocument>, ) => void; didOpenDocument?: ( event: TextDocumentChangeEvent<TextDocument>, ) => void; didSaveDocument?: ( event: TextDocumentChangeEvent<TextDocument>, ) => void; onWatchedFilesChange?: ( callback: (params: DidChangeWatchedFilesParams) => void, ) => Disposable; willSaveDocument?: ( event: TextDocumentWillSaveEvent<TextDocument>, ) => void; willSaveDocumentWaitUntil?: ( event: TextDocumentWillSaveEvent<TextDocument>, ) => MaybePromise<(...)
[]>; }; ExecuteCommandHandler?: ExecuteCommandHandler; FileOperationHandler?: FileOperationHandler; FuzzyMatcher?: FuzzyMatcher; LanguageServer?: LanguageServer; NodeKindProvider?: NodeKindProvider; WorkspaceSymbolProvider?: WorkspaceSymbolProvider; }; ServiceRegistry?: { all?: readonly (
| undefined | { documentation?: { CommentProvider?: ...
; DocumentationProvider?: ...
; }; Grammar?: { $container?: ...
; $containerIndex?: ...
; $containerProperty?: ...
; $cstNode?: ...
; $document?: ...
; $type?: ...
; imports?: ...
; interfaces?: ...
; isDeclared?: ...
; name?: ...
; rules?: ...
; types?: ...
; }; LanguageMetaData?: { caseInsensitive?: ...
; fileExtensions?: ...
; fileNames?: ...
; languageId?: ...
; mode?: ...
; }; parser?: { AsyncParser?: ...
; CompletionParser?: ...
; GrammarConfig?: ...
; LangiumParser?: ...
; Lexer?: ...
; LexerErrorMessageProvider?: ...
; ParserConfig?: ...
; ParserErrorMessageProvider?: ...
; TokenBuilder?: ...
; ValueConverter?: ...
; }; references?: { Linker?: ...
; NameProvider?: ...
; References?: ...
; ScopeComputation?: ...
; ScopeProvider?: ...
; }; serializer?: { Hydrator?: ...
; JsonSerializer?: ...
}; shared?: { AstReflection?: ...
; ServiceRegistry?: ...
; workspace?: ...
; }; validation?: { DocumentValidator?: ...
; ValidationRegistry?: ...
}; workspace?: { AstNodeDescriptionProvider?: ...
; AstNodeLocator?: ...
; ReferenceDescriptionProvider?: ...
; }; } )
[]; getServices?: (uri: URI) => LangiumCoreServices; hasServices?: (uri: URI) => boolean; register?: (language: LangiumCoreServices) => void; }; workspace?: { ConfigurationProvider?: { getConfiguration?: ( language: string, configuration: string, ) => Promise<any>; initialize?: (params: InitializeParams) => void; initialized?: (params: ConfigurationInitializedParams) => Promise<void>; onConfigurationSectionUpdate?: ( callback: ConfigurationSectionUpdateListener, ) => Disposable; ready?: { "[toStringTag]"?: string; catch?: <TResult = ...
>(onrejected?: ...
) => ...
; finally?: (onfinally?: ...
) => ...
; then?: <TResult1 = ...
, TResult2 = ...
>( onfulfilled?: ...
, onrejected?: ...
, ) => ...
; }; updateConfiguration?: (change: DidChangeConfigurationParams) => void; }; DocumentBuilder?: { build?: <T extends AstNode>( documents: LangiumDocument<(...)
>[], options?: BuildOptions, cancelToken?: Cancellation.CancellationToken, ) => Promise<void>; onBuildPhase?: ( targetState: DocumentState, callback: DocumentBuildListener, ) => Disposable; onDocumentPhase?: ( targetState: DocumentState, callback: DocumentPhaseListener, ) => Disposable; onUpdate?: (callback: DocumentUpdateListener) => Disposable; resetToState?: <T extends AstNode>( document: LangiumDocument<T>, state: DocumentState, ) => void; update?: ( changed: URI[], deleted: URI[], cancelToken?: Cancellation.CancellationToken, ) => Promise<void>; updateBuildOptions?: { eagerLinking?: boolean; validation?: boolean | ValidationOptions; }; waitUntil?: { ( state: DocumentState, cancelToken?: Cancellation.CancellationToken, ): Promise<void>; ( state: DocumentState, uri?: URI, cancelToken?: Cancellation.CancellationToken, ): Promise<(...)
| (...)
>; }; }; FileSystemProvider?: FileSystemProvider; IndexManager?: IndexManager; LangiumDocumentFactory?: LangiumDocumentFactory; LangiumDocuments?: { addDocument?: (document: LangiumDocument) => void; all?: Stream<LangiumDocument<AstNode>>; createDocument?: { (uri: URI, text: string): LangiumDocument; ( uri: URI, text: string, cancellationToken: Cancellation.CancellationToken, ): Promise<LangiumDocument<(...)
>>; }; deleteDocument?: (uri: URI) => undefined | LangiumDocument<(...)
>; deleteDocuments?: (uri: URI) => LangiumDocument<(...)
>[]; getDocument?: (uri: URI) => undefined | LangiumDocument<(...)
>; getOrCreateDocument?: ( uri: URI, cancellationToken?: Cancellation.CancellationToken, ) => Promise<LangiumDocument<(...)
>>; hasDocument?: (uri: URI) => boolean; invalidateDocument?: (uri: URI) => undefined | LangiumDocument<(...)
>; }; NotebookDocuments?: { cellTextDocuments?: TextDocuments<TextDocument>; findNotebookDocumentForCell?: ( cell: string | URI | NotebookCell, ) => undefined | NotebookDocument; getCellTextDocument?: (cell: NotebookCell) => undefined | TextDocument; getNotebookCell?: (uri: string | URI) => undefined | NotebookCell; getNotebookDocument?: ( uri: string | URI, ) => undefined | NotebookDocument; listen?: (connection: Connection) => Disposable; onDidChange?: Event<NotebookDocumentChangeEvent>; onDidClose?: Event<NotebookDocument>; onDidOpen?: Event<NotebookDocument>; onDidSave?: Event<NotebookDocument>; }; TextDocuments?: TextDocumentProvider & TextDocuments<TextDocument>; WorkspaceLock?: WorkspaceLock; WorkspaceManager?: { initialBuildOptions?: BuildOptions; initialize?: (params: InitializeParams) => void; initialized?: (params: InitializedParams) => Promise<void>; initializeWorkspace?: ( folders: WorkspaceFolder[], cancelToken?: Cancellation.CancellationToken, ) => Promise<void>; ready?: { "[toStringTag]"?: string; catch?: <TResult = ...
>(onrejected?: ...
) => ...
; finally?: (onfinally?: ...
) => ...
; then?: <TResult1 = ...
, TResult2 = ...
>( onfulfilled?: ...
, onrejected?: ...
, ) => ...
; }; searchFolder?: (uri: URI) => Promise<(...)
[]>; shouldIncludeEntry?: (entry: FileSystemNode) => boolean; workspaceFolders?: readonly WorkspaceFolder[]; }; }; }, >, module?: Module< LangiumGrammarServices, { documentation?: { CommentProvider?: CommentProvider; DocumentationProvider?: DocumentationProvider; }; Grammar?: { $container?: AstNode; $containerIndex?: number; $containerProperty?: string; $cstNode?: CstNode; $document?: LangiumDocument<AstNode>; $type?: "Grammar"; imports?: (
| undefined | { $container?: { readonly $type?: "Grammar" | undefined; imports?: ({ readonly $container?: ... | undefined; readonly $type?: "GrammarImport" | undefined; path?: string | undefined; readonly $containerProperty?: string | undefined; readonly $containerIndex?: number | undefined; readonly $cstNode?: CstNode | undefined; readonly $do...
; $containerIndex?: number; $containerProperty?: string; $cstNode?: CstNode; $document?: LangiumDocument<(...)
>; $type?: "GrammarImport"; path?: string; } )
[]; interfaces?: (
| undefined | { $container?: { readonly $type?: "Grammar" | undefined; imports?: ({ readonly $container?: ... | undefined; readonly $type?: "GrammarImport" | undefined; path?: string | undefined; readonly $containerProperty?: string | undefined; readonly $containerIndex?: number | undefined; readonly $cstNode?: CstNode | undefined; readonly $do...
; $containerIndex?: number; $containerProperty?: string; $cstNode?: CstNode; $document?: LangiumDocument<(...)
>; $type?: "Interface"; attributes?: (...)
[]; name?: string; superTypes?: (...)
[]; } )
[]; isDeclared?: boolean; name?: string; rules?: (
| undefined | { $container?: { readonly $type?: "Grammar" | undefined; imports?: ({ readonly $container?: ... | undefined; readonly $type?: "GrammarImport" | undefined; path?: string | undefined; readonly $containerProperty?: string | undefined; readonly $containerIndex?: number | undefined; readonly $cstNode?: CstNode | undefined; readonly $do...
; $containerIndex?: number; $containerProperty?: string; $cstNode?: CstNode; $document?: LangiumDocument<(...)
>; $type?: "InfixRule"; call?: { $container?: ...
; $containerIndex?: ...
; $containerProperty?: ...
; $cstNode?: ...
; $document?: ...
; $type?: ...
; arguments?: ...
; cardinality?: ...
; predicate?: ...
; rule?: ...
; }; dataType?: GrammarAST.PrimitiveType; inferredType?: GrammarAST.InferredType; name?: string; operators?: { $container?: ...
; $containerIndex?: ...
; $containerProperty?: ...
; $cstNode?: ...
; $document?: ...
; $type?: ...
; precedences?: ...
; }; parameters?: (...)
[]; returnType?: Reference<(...)
>; } | { $container?: { readonly $type?: "Grammar" | undefined; imports?: ({ readonly $container?: ... | undefined; readonly $type?: "GrammarImport" | undefined; path?: string | undefined; readonly $containerProperty?: string | undefined; readonly $containerIndex?: number | undefined; readonly $cstNode?: CstNode | undefined; readonly $do...
; $containerIndex?: number; $containerProperty?: string; $cstNode?: CstNode; $document?: LangiumDocument<(...)
>; $type?: "ParserRule"; dataType?: GrammarAST.PrimitiveType; definition?: { $container?: ...
; $containerIndex?: ...
; $containerProperty?: ...
; $cstNode?: ...
; $document?: ...
; $type?: ...
; cardinality?: ...
; }; entry?: boolean; fragment?: boolean; inferredType?: GrammarAST.InferredType; name?: string; parameters?: (...)
[]; returnType?: Reference<(...)
>; } | { $container?: { readonly $type?: "Grammar" | undefined; imports?: ({ readonly $container?: ... | undefined; readonly $type?: "GrammarImport" | undefined; path?: string | undefined; readonly $containerProperty?: string | undefined; readonly $containerIndex?: number | undefined; readonly $cstNode?: CstNode | undefined; readonly $do...
; $containerIndex?: number; $containerProperty?: string; $cstNode?: CstNode; $document?: LangiumDocument<(...)
>; $type?: "TerminalRule"; definition?: { $container?: ...
; $containerIndex?: ...
; $containerProperty?: ...
; $cstNode?: ...
; $document?: ...
; $type?: ...
; cardinality?: ...
; lookahead?: ...
; parenthesized?: ...
; }; fragment?: boolean; hidden?: boolean; name?: string; type?: GrammarAST.ReturnType; } )
[]; types?: (
| undefined | { $container?: { readonly $type?: "Grammar" | undefined; imports?: ({ readonly $container?: ... | undefined; readonly $type?: "GrammarImport" | undefined; path?: string | undefined; readonly $containerProperty?: string | undefined; readonly $containerIndex?: number | undefined; readonly $cstNode?: CstNode | undefined; readonly $do...
; $containerIndex?: number; $containerProperty?: string; $cstNode?: CstNode; $document?: LangiumDocument<(...)
>; $type?: "Type"; name?: string; type?: | { $container?: ...
; $containerIndex?: ...
; $containerProperty?: ...
; $cstNode?: ...
; $document?: ...
; $type?: ...
; elementType?: ...
; } | { $container?: ...
; $containerIndex?: ...
; $containerProperty?: ...
; $cstNode?: ...
; $document?: ...
; $type?: ...
; isMulti?: ...
; referenceType?: ...
; } | { $container?: ...
; $containerIndex?: ...
; $containerProperty?: ...
; $cstNode?: ...
; $document?: ...
; $type?: ...
; types?: ...
; } | { $container?: ...
; $containerIndex?: ...
; $containerProperty?: ...
; $cstNode?: ...
; $document?: ...
; $type?: ...
; primitiveType?: ...
; stringType?: ...
; typeRef?: ...
; }; } )
[]; }; LanguageMetaData?: { caseInsensitive?: boolean; fileExtensions?: readonly (
undefined | string)
[]; fileNames?: readonly string[]; languageId?: string; mode?: "development" | "production"; }; lsp?: { CallHierarchyProvider?: CallHierarchyProvider; CodeActionProvider?: CodeActionProvider; CodeLensProvider?: CodeLensProvider; CompletionProvider?: CompletionProvider; DeclarationProvider?: DeclarationProvider; DefinitionProvider?: DefinitionProvider; DocumentHighlightProvider?: DocumentHighlightProvider; DocumentLinkProvider?: DocumentLinkProvider; DocumentSymbolProvider?: DocumentSymbolProvider; FoldingRangeProvider?: FoldingRangeProvider; Formatter?: Formatter; HoverProvider?: HoverProvider; ImplementationProvider?: ImplementationProvider; InlayHintProvider?: InlayHintProvider; ReferencesProvider?: ReferencesProvider; RenameProvider?: RenameProvider; SemanticTokenProvider?: SemanticTokenProvider; SignatureHelp?: SignatureHelpProvider; TypeHierarchyProvider?: TypeHierarchyProvider; TypeProvider?: TypeDefinitionProvider; }; parser?: { AsyncParser?: AsyncParser; CompletionParser?: { action?: () => void; after?: (element: GrammarAST.AbstractElement) => void; alternatives?: (idx: number, choices: IOrAlt<(...)
>[]) => void; atLeastOne?: (idx: number, callback: DSLMethodOpts<unknown>) => void; before?: (element: GrammarAST.AbstractElement) => void; construct?: () => unknown; consume?: ( idx: number, tokenType: TokenType, feature: GrammarAST.AbstractElement, ) => void; currIdx?: number; finalize?: () => void; getRule?: (name: string) => undefined | RuleResult; getRuleStack?: () => number[]; isRecording?: () => boolean; keepStackSize?: () => number; many?: (idx: number, callback: DSLMethodOpts<unknown>) => void; optional?: (idx: number, callback: DSLMethodOpts<unknown>) => void; parse?: (input: string) => CompletionParserResult; resetStackSize?: (size: number) => void; rule?: (rule: GrammarAST.ParserRule, impl: RuleImpl) => RuleResult; subrule?: ( idx: number, rule: RuleResult, fragment: boolean, feature: GrammarAST.AbstractElement, args: Args, ) => void; unorderedGroups?: { "[iterator]"?: () => ...
; "[toStringTag]"?: string; clear?: () => ...
; delete?: (key: ...
) => ...
; entries?: () => ...
; forEach?: (callbackfn: ...
, thisArg?: ...
) => ...
; get?: (key: ...
) => ...
; has?: (key: ...
) => ...
; keys?: () => ...
; set?: (key: ...
, value: ...
) => this; size?: number; values?: () => ...
; }; }; GrammarConfig?: { multilineCommentRules?: (
undefined | string)
[]; nameRegexp?: { "[match]"?: (string: ...
) => ...
; "[matchAll]"?: (str: ...
) => ...
; "[replace]"?: { (string: ...
, replaceValue: ...
): ...
; (string: ...
, replacer: ...
): ...
; }; "[search]"?: (string: ...
) => ...
; "[split]"?: (string: ...
, limit?: ...
) => ...
; compile?: (pattern: ...
, flags?: ...
) => this; dotAll?: boolean; exec?: (string: ...
) => ...
; flags?: string; global?: boolean; ignoreCase?: boolean; lastIndex?: number; multiline?: boolean; source?: string; sticky?: boolean; test?: (string: ...
) => ...
; unicode?: boolean; }; }; LangiumParser?: { action?: ($type: string, action: GrammarAST.Action) => void; alternatives?: (idx: number, choices: IOrAlt<(...)
>[]) => void; atLeastOne?: (idx: number, callback: DSLMethodOpts<unknown>) => void; consume?: ( idx: number, tokenType: TokenType, feature: GrammarAST.AbstractElement, ) => void; definitionErrors?: (
undefined | { message?: ...
; ruleName?: ...
; type?: ...
} )
[]; finalize?: () => void; getRule?: (name: string) => undefined | RuleResult; getRuleStack?: () => number[]; isRecording?: () => boolean; many?: (idx: number, callback: DSLMethodOpts<unknown>) => void; optional?: (idx: number, callback: DSLMethodOpts<unknown>) => void; parse?: <T extends AstNode = AstNode>( input: string, options?: ParserOptions, ) => ParseResult<T>; rule?: ( rule: GrammarAST.InfixRule | GrammarAST.ParserRule, impl: RuleImpl, ) => RuleResult; subrule?: ( idx: number, rule: RuleResult, fragment: boolean, feature: GrammarAST.AbstractElement, args: Args, ) => void; unorderedGroups?: { "[iterator]"?: () => ...
; "[toStringTag]"?: string; clear?: () => ...
; delete?: (key: ...
) => ...
; entries?: () => ...
; forEach?: (callbackfn: ...
, thisArg?: ...
) => ...
; get?: (key: ...
) => ...
; has?: (key: ...
) => ...
; keys?: () => ...
; set?: (key: ...
, value: ...
) => this; size?: number; values?: () => ...
; }; }; Lexer?: { definition?: { [key: string]: | undefined | { CATEGORIES?: ...
; categoryMatches?: ...
; categoryMatchesMap?: ...
; GROUP?: ...
; isParent?: ...
; LABEL?: ...
; LINE_BREAKS?: ...
; LONGER_ALT?: ...
; name?: ...
; PATTERN?: ...
; POP_MODE?: ...
; PUSH_MODE?: ...
; START_CHARS_HINT?: ...
; tokenTypeIdx?: ...
; }; }; tokenize?: (text: string, options?: TokenizeOptions) => LexerResult; }; LexerErrorMessageProvider?: ILexerErrorMessageProvider; ParserConfig?: IParserConfig; ParserErrorMessageProvider?: IParserErrorMessageProvider; TokenBuilder?: { buildTokens?: ( grammar: Grammar, options?: TokenBuilderOptions, ) => TokenVocabulary; flushLexingReport?: (text: string) => LexingReport; }; ValueConverter?: ValueConverter; }; references?: { Linker?: Linker; NameProvider?: NameProvider; References?: References; ScopeComputation?: ScopeComputation; ScopeProvider?: ScopeProvider; }; serializer?: { Hydrator?: Hydrator; JsonSerializer?: JsonSerializer }; shared?: { AstReflection?: { getAllSubTypes?: (type: string) => string[]; getAllTypes?: () => string[]; getReferenceType?: (refInfo: ReferenceInfo) => string; getTypeMetaData?: (type: string) => TypeMetaData; isInstance?: (node: unknown, type: string) => boolean; isSubtype?: (subtype: string, supertype: string) => boolean; types?: { [key: string]: | undefined | { name?: ...
; properties?: ...
; superTypes?: ...
}; }; }; lsp?: { Connection?: Connection; DocumentUpdateHandler?: { didChangeContent?: (event: ...
) => ...
; didChangeWatchedFiles?: (params: ...
) => ...
; didCloseDocument?: (event: ...
) => ...
; didOpenDocument?: (event: ...
) => ...
; didSaveDocument?: (event: ...
) => ...
; onWatchedFilesChange?: (callback: ...
) => ...
; willSaveDocument?: (event: ...
) => ...
; willSaveDocumentWaitUntil?: (event: ...
) => ...
; }; ExecuteCommandHandler?: ExecuteCommandHandler; FileOperationHandler?: FileOperationHandler; FuzzyMatcher?: FuzzyMatcher; LanguageServer?: LanguageServer; NodeKindProvider?: NodeKindProvider; WorkspaceSymbolProvider?: WorkspaceSymbolProvider; }; ServiceRegistry?: { all?: readonly (
| undefined | { documentation?: ...
; Grammar?: ...
; LanguageMetaData?: ...
; parser?: ...
; references?: ...
; serializer?: ...
; shared?: ...
; validation?: ...
; workspace?: ...
; } )
[]; getServices?: (uri: URI) => LangiumCoreServices; hasServices?: (uri: URI) => boolean; register?: (language: LangiumCoreServices) => void; }; workspace?: { ConfigurationProvider?: { getConfiguration?: (language: ...
, configuration: ...
) => ...
; initialize?: (params: ...
) => ...
; initialized?: (params: ...
) => ...
; onConfigurationSectionUpdate?: (callback: ...
) => ...
; ready?: { "[toStringTag]"?: ...
; catch?: ...
; finally?: ...
; then?: ...
; }; updateConfiguration?: (change: ...
) => ...
; }; DocumentBuilder?: { build?: <T extends ...
>( documents: ...
, options?: ...
, cancelToken?: ...
, ) => ...
; onBuildPhase?: (targetState: ...
, callback: ...
) => ...
; onDocumentPhase?: (targetState: ...
, callback: ...
) => ...
; onUpdate?: (callback: ...
) => ...
; resetToState?: <T extends ...
>(document: ...
, state: ...
) => ...
; update?: (changed: ...
, deleted: ...
, cancelToken?: ...
) => ...
; updateBuildOptions?: { eagerLinking?: ...
; validation?: ...
}; waitUntil?: { (state: ...
, cancelToken?: ...
): ...
; (state: ...
, uri?: ...
, cancelToken?: ...
): ...
; }; }; FileSystemProvider?: FileSystemProvider; IndexManager?: IndexManager; LangiumDocumentFactory?: LangiumDocumentFactory; LangiumDocuments?: { addDocument?: (document: ...
) => ...
; all?: Stream<(...)
>; createDocument?: { (uri: ...
, text: ...
): ...
; (uri: ...
, text: ...
, cancellationToken: ...
): ...
; }; deleteDocument?: (uri: ...
) => ...
; deleteDocuments?: (uri: ...
) => ...
; getDocument?: (uri: ...
) => ...
; getOrCreateDocument?: (uri: ...
, cancellationToken?: ...
) => ...
; hasDocument?: (uri: ...
) => ...
; invalidateDocument?: (uri: ...
) => ...
; }; NotebookDocuments?: { cellTextDocuments?: TextDocuments<(...)
>; findNotebookDocumentForCell?: (cell: ...
) => ...
; getCellTextDocument?: (cell: ...
) => ...
; getNotebookCell?: (uri: ...
) => ...
; getNotebookDocument?: (uri: ...
) => ...
; listen?: (connection: ...
) => ...
; onDidChange?: Event<(...)
>; onDidClose?: Event<(...)
>; onDidOpen?: Event<(...)
>; onDidSave?: Event<(...)
>; }; TextDocuments?: TextDocumentProvider & TextDocuments<TextDocument>; WorkspaceLock?: WorkspaceLock; WorkspaceManager?: { initialBuildOptions?: BuildOptions; initialize?: (params: ...
) => ...
; initialized?: (params: ...
) => ...
; initializeWorkspace?: (folders: ...
, cancelToken?: ...
) => ...
; ready?: { "[toStringTag]"?: ...
; catch?: ...
; finally?: ...
; then?: ...
; }; searchFolder?: (uri: ...
) => ...
; shouldIncludeEntry?: (entry: ...
) => ...
; workspaceFolders?: readonly (...)
[]; }; }; }; validation?: { DocumentValidator?: DocumentValidator; LangiumGrammarTypesValidator?: LangiumGrammarTypesValidator; LangiumGrammarValidator?: { checkAssignmentReservedName?: ( assignment: GrammarAST.Action | GrammarAST.Assignment, accept: ValidationAcceptor, ) => void; checkAssignmentToFragmentRule?: ( assignment: GrammarAST.Assignment, accept: ValidationAcceptor, ) => void; checkAssignmentTypes?: ( assignment: GrammarAST.Assignment, accept: ValidationAcceptor, ) => void; checkAssignmentWithFeatureName?: ( assignment: GrammarAST.Assignment, accept: ValidationAcceptor, ) => void; checkClashingTerminalNames?: ( grammar: Grammar, accept: ValidationAcceptor, ) => void; checkCrossReferenceSyntax?: ( crossRef: GrammarAST.CrossReference, accept: ValidationAcceptor, ) => void; checkCrossReferenceToTypeUnion?: ( reference: GrammarAST.CrossReference, accept: ValidationAcceptor, ) => void; checkCrossRefNameAssignment?: ( reference: GrammarAST.CrossReference, accept: ValidationAcceptor, ) => void; checkCrossRefTerminalType?: ( reference: GrammarAST.CrossReference, accept: ValidationAcceptor, ) => void; checkCrossRefType?: ( reference: GrammarAST.CrossReference, accept: ValidationAcceptor, ) => void; checkDirectlyUsedRegexFlags?: ( token: GrammarAST.RegexToken, accept: ValidationAcceptor, ) => void; checkDuplicateImportedGrammar?: ( grammar: Grammar, accept: ValidationAcceptor, ) => void; checkEmptyParserRule?: ( parserRule: GrammarAST.ParserRule, accept: ValidationAcceptor, ) => void; checkEmptyTerminalRule?: ( terminalRule: GrammarAST.TerminalRule, accept: ValidationAcceptor, ) => void; checkEntryGrammarRule?: ( grammar: Grammar, accept: ValidationAcceptor, ) => void; checkFragmentsInTypes?: ( type: GrammarAST.SimpleType, accept: ValidationAcceptor, ) => void; checkGrammarForUnusedRules?: ( grammar: Grammar, accept: ValidationAcceptor, ) => void; checkGrammarName?: ( grammar: Grammar, accept: ValidationAcceptor, ) => void; checkGrammarTypeInfer?: ( grammar: Grammar, accept: ValidationAcceptor, ) => void; checkHiddenTerminalRule?: ( terminalRule: GrammarAST.TerminalRule, accept: ValidationAcceptor, ) => void; checkInfixRuleDataType?: ( rule: GrammarAST.InfixRule, accept: ValidationAcceptor, ) => void; checkInterfacePropertyTypes?: ( interfaceDecl: GrammarAST.Interface, accept: ValidationAcceptor, ) => void; checkInvalidCharacterRange?: ( range: GrammarAST.CharacterRange, accept: ValidationAcceptor, ) => void; checkInvalidRegexFlags?: ( token: GrammarAST.RegexToken, accept: ValidationAcceptor, ) => void; checkKeyword?: ( keyword: GrammarAST.Keyword, accept: ValidationAcceptor, ) => void; checkMultiRuleCallsAreAssigned?: ( call: GrammarAST.RuleCall, accept: ValidationAcceptor, ) => void; checkOperatorMultiplicitiesForMultiAssignments?: ( rule: GrammarAST.ParserRule, accept: ValidationAcceptor, ) => void; checkPackageImport?: ( imp: GrammarAST.GrammarImport, accept: ValidationAcceptor, ) => void; checkParserRuleDataType?: ( rule: GrammarAST.ParserRule, accept: ValidationAcceptor, ) => void; checkParserRuleReservedName?: ( rule: GrammarAST.ParserRule, accept: ValidationAcceptor, ) => void; checkPredicateNotSupported?: ( node: | GrammarAST.Assignment | GrammarAST.Group | GrammarAST.RuleCall | GrammarAST.Keyword, accept: ValidationAcceptor, ) => void; checkReferenceTypeUnion?: ( type: GrammarAST.ReferenceType, accept: ValidationAcceptor, ) => void; checkRuleCallParameters?: ( ruleCall: GrammarAST.RuleCall, accept: ValidationAcceptor, ) => void; checkRuleName?: ( rule: GrammarAST.AbstractRule, accept: ValidationAcceptor, ) => void; checkRuleParameters?: ( rule: GrammarAST.ParserRule, accept: ValidationAcceptor, ) => void; checkTerminalRuleReturnType?: ( rule: GrammarAST.TerminalRule, accept: ValidationAcceptor, ) => void; checkTypeReservedName?: ( type: | GrammarAST.InferredType | GrammarAST.Interface | GrammarAST.Type | GrammarAST.TypeAttribute, accept: ValidationAcceptor, ) => void; checkUniqueImportedRules?: ( grammar: Grammar, accept: ValidationAcceptor, ) => void; checkUniqueRuleName?: ( grammar: Grammar, accept: ValidationAcceptor, ) => void; checkUniqueTypeAndGrammarNames?: ( inputGrammar: Grammar, accept: ValidationAcceptor, ) => void; checkUniqueTypeName?: ( grammar: Grammar, accept: ValidationAcceptor, ) => void; checkUnorderedGroup?: ( unorderedGroup: GrammarAST.UnorderedGroup, accept: ValidationAcceptor, ) => void; checkUsedFragmentTerminalRule?: ( ruleCall: GrammarAST.RuleCall, accept: ValidationAcceptor, ) => void; checkUsedHiddenTerminalRule?: ( ruleCall: GrammarAST.RuleCall | GrammarAST.TerminalRuleCall, accept: ValidationAcceptor, ) => void; options?: { types?: "normal" | "strict" }; }; ValidationRegistry?: { checksAfter?: (
undefined | ValidationPreparation)
[]; checksBefore?: (
undefined | ValidationPreparation)
[]; getChecks?: ( type: string, categories?: (...)
[], ) => Stream<ValidationCheck<(...)
>>; register?: <T>( checksRecord: ValidationChecks<T>, thisObj?: unknown, category?: ValidationCategory, ) => void; registerAfterDocument?: ( checkAfter: ValidationPreparation, thisObj?: unknown, ) => void; registerBeforeDocument?: ( checkBefore: ValidationPreparation, thisObj?: unknown, ) => void; }; ValidationResourcesCollector?: LangiumGrammarValidationResourcesCollector; }; workspace?: { AstNodeDescriptionProvider?: AstNodeDescriptionProvider; AstNodeLocator?: AstNodeLocator; ReferenceDescriptionProvider?: ReferenceDescriptionProvider; }; }, >,): { grammar: LangiumGrammarServices; shared: LangiumSharedServices }
Creates Langium grammar services, enriched with LSP functionality