PredictionContext Class

Definition

Context information about the user input.

public sealed class PredictionContext
[System.Runtime.CompilerServices.Nullable(0)]
[System.Runtime.CompilerServices.NullableContext(1)]
public sealed class PredictionContext
type PredictionContext = class
[<System.Runtime.CompilerServices.Nullable(0)>]
[<System.Runtime.CompilerServices.NullableContext(1)>]
type PredictionContext = class
Public NotInheritable Class PredictionContext
Inheritance
PredictionContext
Attributes

Constructors

PredictionContext(Ast, Token[])

Initializes a new instance of the PredictionContext class from the AST and tokens that represent the user input.

Properties

CursorPosition

Gets the cursor position, which is assumed always at the end of the input line.

InputAst

Gets the abstract syntax tree (AST) generated from parsing the user input.

InputTokens

Gets the tokens generated from parsing the user input.

RelatedAsts

Gets all ASTs that are related to the cursor position, which is assumed always at the end of the input line.

TokenAtCursor

Gets the token at the cursor.

Methods

Create(String)

Creates a context instance from the user input line.

Applies to