Table of Contents

Class PowerFxParser

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

Represents a class that performs syntax and lexical analysis of specified PowerFx expression.

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

Constructors

PowerFxParser()

Initializes a new instance of the PowerFxParser class.

PowerFxParser(PowerFxConfig)

Properties

DefaultFxSyntaxOptions

Represents default set of flags determining syntax parsing and formatting behavior.

EvaluateQuickInfo

Indicates whether parser should try to evaluate quick info values.

Evaluator

Gets PowerFXEvaluator object used to parse and evaluate PowerFx expressions.

FileName

Gets or sets file name of the file being parsed.

GlobalContextAsJson

Gets or sets global JSON object whose properties become global variables in the Power Fx expression. Changes PowerFxGlobals property.

PowerFxGlobals

Gets or sets global variables of the PowerFx expression.

PowerFxOptions

Gets PowerFx related options.

PowerFxScope

Gets or sets Microsoft.PowerFx.EditorContextScope of the PowerFx expression.

PowerFxSymbols

Gets or sets global variables of the PowerFx expression. Changes PowerFxScope property.

Resolver
SyntaxRoot

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.

CreateTokenizer()
GetCompletionType(char)

Obtains type of code completion window from specifies char parameter.

GetCurrentChar(int, int)
GetSmartIndent(int, bool)

Returns indentation level of specified line.

GetSyntaxErrors(IList<ISyntaxError>)

Retrieves all syntax errors found while analyzing the text.

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

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

IsKnownFunction(string)
IsValidJson(string)

Checks whether specified string a valid json text.

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.

Outline(IList<IRange>, TexlNode, SpanResolver, int)
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)

Prepares parser for parsing a text.

RaiseGlobalsChanged()

Updates syntax when global variables used in the expression are changed. This method is called automatically when globals are changed.

ReparseText()

Reparses entire text.

ResetCodeCompletionChars()

Resets CodeCompletionChars to the default value.

ResetOptions()

Resets Options to the default value.

ResetParseInterval()

Resets ParseInterval to the default value.

ShouldSerializeCodeCompletionChars()

Indicates whether the CodeCompletionChars property should be persisted.

ShouldSerializeOptions()

Indicates whether the Options property should be persisted.

ShouldSerializeParseInterval()

Indicates whether the ParseInterval property should be persisted.

SmartFormatLine(int, string, StringItemInfo[], ITextUndoList, out bool)

Formats line according to the parser rules.