Class LspParser
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
Properties
- Document
Gets a
LspDocument
associated with this parser.
- FileName
Gets or sets file name of the file being parsed.
- 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.
Methods
- 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.
- 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.
- GetCompletionType(char)
Obtains type of code completion window from specifies
char
parameter.
- GetSmartIndent(int, bool)
Returns indentation level of specified line.
- GetSmartIndentString(int, bool, bool, int)
Returns indentation string for specified line.
- Outline()
Creates outlined sections for parsed text using result of syntax analysis.
- 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.
- StopParsing(bool)
Aborts parsing process.
- SupportsAdvancedFormatting()
Indicates whether advanced code formatting or smart indenting is supported.
- SupportsAsyncParsing()
Indicates whether parser supports async parsing.