Create an Langium document from an in-memory string.
Optionaloptions: ParserOptionsCreate a Langium document from an in-memory string asynchronously. This action can be cancelled if a cancellable parser implementation has been provided.
Create a Langium document from a TextDocument (usually associated with a file).
Optionaluri: URIOptionaloptions: ParserOptionsCreate a Langium document from a TextDocument asynchronously. This action can be cancelled if a cancellable parser implementation has been provided.
Create an Langium document from a specified URI. The factory will use the FileSystemAccess service to read the file.
OptionalcancellationToken: Cancellation.CancellationTokenUpdate the given document after changes in the corresponding textual representation. Method is called by the document builder after it has been requested to build an existing document and the document's state is DocumentState.Changed. The text parsing is expected to be done the same way as in fromTextDocument and fromString.
Shared service for creating
LangiumDocumentinstances.Register a custom implementation if special (additional) behavior is required for your language(s). Note: If you specialize fromString or fromTextDocument you probably might want to specialize update, too!