Table of Contents

Class LspParser

Namespace
Alternet.Syntax.Parsers.Lsp
Assembly
Alternet.Syntax.Parsers.Lsp.v10.dll

Represents base class for LSP parsers. This class is abstract.

public abstract class LspParser : SyntaxParser, IComponent, IDisposable, ISyntaxParser, IParser, ILexer, INotify, IUpdate, IImport, ILspDocumentProvider
Inheritance
LspParser
Implements
Derived

Constructors

LspParser()
LspParser(IContainer?)

Properties

Document

Gets a LspDocument associated with this parser.

FileName

Gets or sets file name of the file being parsed.

LanguageExtension
OnPublishDiagnosticsFilterRequired
Repository

Gets a LspRepository that holds methods for code completion purposes.

Scheme

Gets or sets a list of rules for lexical analysis.

SmartFormatChars

Gets or sets a collection of characters that initializes a smart formatting procedure when typing.

Strings

Gets or sets a list of strings to parse.

ThemeName
Tokenizer
UseTokenizerForSmartFormat
Workspace
WorkspaceScope

Methods

AfterLoad()
CodeCompletion(string, StringItemInfo[], Point, CodeCompletionArgs)

Performs code completion for the specified text representing language element.

CreateRepository()

Creates ICodeCompletionRepository to perform code completion functionality for this parser.

CreateTokenizer()
CreateWorkspace()
DiagnosticToSyntaxError(Diagnostic)
Dispose(bool)
DoCodeCompletionAsync(Point, CodeCompletionArgs, CancellationToken, bool)

Performs code completion for the specified text representing language element.

FindDeclarationAsync(Point, bool, CancellationToken)

Finds the declaration location at given position.

FindReferencesAsync(Point, IRangeList, bool, CancellationToken)

Locates declaration at given position and finds all references to this declaration in the text.

FindReferencesCoreAsync(Point, IRangeList, bool, CancellationToken)
FindReferencesInAllDocumentsAsync(Point, IRangeList, CancellationToken)
FindReferencesInCurrentDocumentAsync(Point, IRangeList, CancellationToken)
GetCompletionType(char)

Obtains type of code completion window from specifies char parameter.

GetDocumentText()
GetLocationSourceText(Location)
GetSmartIndent(int, bool)

Returns indentation level of specified line.

GetSmartIndentString(int, bool, bool, int)

Returns indentation string for specified line.

GetSyntaxErrors(IList<ISyntaxError>, ISyntaxNode)
InitLexer()
InitTokenizer()
LoadThemeFromPath(string)
LoadThemeFromStream(Stream)
LspFoldingRangeToOutlineRange(FoldingRange)
OnDocumentFileNameChanged()
OnPublishDiagnostics(Container<Diagnostic>)
OnThemeNameChanged()
OnWorkspaceChanged(LspWorkspace?, LspWorkspace)
Outline()

Creates outlined sections for parsed text using result of syntax analysis.

OutlineAsync(IList<IRange>, CancellationToken)
ParseText(int, int, string, ref StringItemInfo[])

Performs lexical analysis of given text.

Prepare(string, IStringList, ISyntaxTree, bool, PrepareReason)

Prepares parser for parsing a text.

ResetOptions()

Resets Options to the default value.

ResetParseInterval()

Resets ParseInterval to the default value.

ShouldSerializeParseInterval()

Indicates whether the ParseInterval property should be persisted.

ShouldSerializeThemeName()

Indicates whether the ThemeName property should be persisted.

SmartFormat(ref Point, bool, int, ITextUndoList, string)

Formats block of text according to the parser rules.

SmartFormat(ref Point, ref Point, bool, int, bool, ITextUndoList)

Formats block of text according to the parser rules.

Start position of the block End position of the block Indicates whether indentation string should contain spaces or tabs Specifies number of spaces in tab Specifies if whole syntax block containing start and end point should be formatted List containing insertion or deletion of text fragments.
SmartFormatAsync(Point, Point, bool, int, IList<TextEdit>, CancellationToken)
SmartFormatAsync(Point, Point, bool, int, CancellationToken)
SmartFormatAsync(Point, string, bool, int, IList<TextEdit>, CancellationToken)
SmartFormatAsync(Point, string, bool, int, CancellationToken)
StopParsing(bool)

Aborts parsing process.

SupportsAdvancedFormatting()

Indicates whether advanced code formatting or smart indenting is supported.

SupportsAsyncParsing()

Indicates whether parser supports async parsing.

UpdateDocument()