Table of Contents

Class RoslynParser

Namespace
Alternet.Syntax.Parsers.Roslyn
Assembly
Alternet.Syntax.Parsers.Roslyn.v9.dll

Represents properties and methods to perform syntax analysis of the text intended to use for Roslyn supported languages.

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

Constructors

RoslynParser(IRoslynSolution)

Initializes a new instance of the RoslynParser class with specified IRoslynSolution.

Properties

FileName

Gets or sets file name of the file being parsed.

ProjectName

Gets or sets a string specifying the name of the project to which the given code corresponds.

Repository

Gets an IRoslynRepository that holds methods for code completion purposes.

RoslynSolution
SourceText
SourceTextContainer

Gets or sets the RoslynTextContainer used to hold and update source code text.

Strings

Gets or sets a list of strings to parse.

SuppressedDiagnostics

Methods

AddSymbolReferences(IList<IRange>, IEnumerable<ReferencedSymbol>, SyntaxTree, bool)
AddSymbolReferences(IList<IRange>, IEnumerable<ISymbol>, SyntaxTree, bool)
AfterLoad()
AsyncFindImplementations(Point, CancellationToken, bool)
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()
DoCodeCompletion(Point, CodeCompletionArgs, CancellationToken, bool)

Performs code completion for the specified text representing language element.

FindCodeActions(Point, Point, Point, ISyntaxError, bool)

Locates and highlights available code fixes and code refactors for given position in the texts.

FindDeclaration(Point)

Finds the declaration node at given position.

FindDeclaration(string, Point)

Finds the declaration node at given position.

FindImplementations(Point, IRangeList, bool)

Finds the symbols that implement an interface or interface member.

FindReferences(Point)

Locates and highlights references at given position in the text.

FindReferences(Point, IRangeList, bool)

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

FindReferencesAsync(Point, IRangeList, bool, CancellationToken)

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

FindReferencesAsync(Point, bool, CancellationToken)
ForceReparseText(bool)

Force text reparsing.

ForceReparseTextAsync(bool, CancellationToken)

Force text reparsing asynchronously.

GetActiveStatementAt(Point)

Gets IRange that corresponds to the statement at specified position.

GetCodeFixesAsync(ISyntaxError, bool, CancellationToken)

Retrieves all code fixes available for the given syntax error in async mode.

GetCodeRefactorsAsync(Point, Point, bool, CancellationToken)

Retrieves all applicable refactors at given range in async mode.

GetCompletionType(char)

Obtains type of code completion window from specifies char parameter.

GetContentDividers(IList<int>)

Gets list of content dividers.

GetCurrentChar(int, int)
GetDeclarationAt(Point)

Gets IRange that corresponds to the declafration at specified position.

GetDiagnostics(SemanticModel)
GetPositionFromPos(SourceText, int, bool)
GetRangeAt(Point)

Gets IRange that contains given position.

GetRangeAt(Point, IList<IRange>)

Gets IRange that contains given position.

GetSmartIndentString(int, bool, bool, int)

Returns indentation string for specified line.

GetStructureGuideLines(IList<IRange>)

Gets list of guide lines.

GetSyntaxErrors(IList<ISyntaxError>)

Retrieves all syntax errors found while analyzing the text.

GetSyntaxErrorsInternal(SemanticModel, SpanResolver, IList<ISyntaxError>)
HasCodeFixesAsync(ISyntaxError, bool, CancellationToken)

Determines if code fixes are available for a given syntax error in async mode.

HasCodeRefactorsAsync(Point, Point, bool, CancellationToken)

Determines if code fixes are available for a given syntax error in async mode.

InitLexer()
IsCodeCompletionChar(char, byte, ref int)

Returns boolean value indicating that given character initializes a code completion procedure when typing.

IsCommentEndAt(string, string, int)
IsCommentStartAt(string, string)
IsDelimiterCodeCompletionChar(char)
LoadFile(string, Encoding)

Loads the contents of the specified file with specified encoding.

OnTextChanged(ITextUndo)

Responds to incremental change of the text in the editor.

Outline(IList<IRange>)

Creates outlined sections for parsed text using result of syntax analysis and fills ranges parameter by the collection of the outlined sections.

OutlineInternal(SyntaxTree, SourceText, IList<IRange>)
OutlineNodes(IList<IRange>, SpanResolver, SyntaxNodeOrToken, int)
OutlineRegions(IList<IRange>, SpanResolver, SyntaxNode, int)
ParseSemanticAsync(Document, CancellationToken)

Performs asynchronous semantic analysis of specified document.

ParseSyntaxAsync(Document, int, int, CancellationToken)

Performs asynchronous syntax analysis of specified document.

ParseText(int, int, string, ref StringItemInfo[])

Performs lexical analysis of given text.

PositionChanged(int, int, int, int)

Changes positions of any syntax nodes and its elements located next to the specified position.

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

Sets lines to parse.

ProcessAutoComplete(string, Point, out string)

Checks whether end-of-block code needs inserting.

ProcessDividers(IList<int>, SpanResolver, SyntaxNode)
ProcessDividersInternal(SyntaxTree, SourceText, IList<int>)
ProcessGuideLines(IList<IRange>, SpanResolver, SyntaxNode)
ProcessGuideLinesInternal(SyntaxTree, SourceText, IList<IRange>)
ProcessSnippetBody(string, Point, out string)

Checks whether snippet body code needs inserting.

ReparseText()

Reparses entire text.

ReparseText(bool)

Reparses entire text.

Specifies whether parser should perform the task in the separate thread
ReparseText(bool, int, int)

Reparses entire text.

Specifies whether parser should perform the task in the separate thread Specifies first changed line in the source text. Specifies last changed line in the source text.
ReparseTextAsync(Document, int, int)
ResetOptions()

Resets Options to the default value.

ResetParseInterval()

Resets ParseInterval to the default value.

SetSourceText(IStringList)
SetSourceText(string)
ShouldSerializeOptions()

Indicates whether the Options property should be persisted.

ShouldSerializeParseInterval()

Indicates whether the ParseInterval 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.

SortAndRemoveDuplicates(IList<IRange>)
StartParsing(string, int, int)

Prepares parser to parse the specified range of the text.

StopParsing()

Aborts parsing process.

SupportsAsyncParsing()

Indicates whether parser supports async parsing.

SupportsTextChanges()

Indicates whether parser supports incremental text changes.

UpdateDocument()