Class SignatureSite
- Namespace
- RDCore.SDK.Model.Symbols.Completion
- Assembly
- RDCore.SDK.dll
The call being written where a signature help is asked for (LSP 3.17 §Signature Help): what is called, and which of its arguments the cursor is in - read off the text of the line before the cursor, as what is being written is for a completion list (CompletionSite).
public sealed record SignatureSite : IEquatable<SignatureSite>
- Inheritance
-
SignatureSite
- Implements
- Inherited Members
Remarks
The call is the innermost one whose argument list is open at the cursor: Left(x, |, o.Item(|, the Mid( of Debug.Print Left(Mid(s, 2|.
An argument list that is open after no name - the parentheses of an expression, (a + | - is no call's, and the one around it is looked for. With no
argument list open, the call is the statement's own when it is a call statement without parentheses (MS-VBAL §5.4.2.1): MsgBox "a", |.
Which argument the cursor is in is counted by the commas of the argument list before it, those of string literals and of argument lists inside it left out; a
named argument (Prompt:=) says the name of the parameter it is given to. A : that is not the start of a := separates statements.
Constructors
SignatureSite(string, int, string?)
The call being written where a signature help is asked for (LSP 3.17 §Signature Help): what is called, and which of its arguments the cursor is in - read off the text of the line before the cursor, as what is being written is for a completion list (CompletionSite).
public SignatureSite(string Callee, int ArgumentIndex, string? ArgumentName = null)
Parameters
CalleestringWhat is called, as it is written:
Left,o.Item,.Add,w.Grow(2).Parts.Add.ArgumentIndexintThe position of the argument the cursor is in, from 0.
ArgumentNamestringThe name the argument is written with, for a named argument; null otherwise.
Remarks
The call is the innermost one whose argument list is open at the cursor: Left(x, |, o.Item(|, the Mid( of Debug.Print Left(Mid(s, 2|.
An argument list that is open after no name - the parentheses of an expression, (a + | - is no call's, and the one around it is looked for. With no
argument list open, the call is the statement's own when it is a call statement without parentheses (MS-VBAL §5.4.2.1): MsgBox "a", |.
Which argument the cursor is in is counted by the commas of the argument list before it, those of string literals and of argument lists inside it left out; a
named argument (Prompt:=) says the name of the parameter it is given to. A : that is not the start of a := separates statements.
Properties
ArgumentIndex
The position of the argument the cursor is in, from 0.
public int ArgumentIndex { get; init; }
Property Value
ArgumentName
The name the argument is written with, for a named argument; null otherwise.
public string? ArgumentName { get; init; }
Property Value
Callee
What is called, as it is written: Left, o.Item, .Add, w.Grow(2).Parts.Add.
public string Callee { get; init; }
Property Value
IsMemberAccess
Whether what is called is a member of something - of the expression of Qualifier, or of the object of a With block when that is empty.
public bool IsMemberAccess { get; }
Property Value
Name
The name of what is called: Item of o.Item.
public string Name { get; }
Property Value
Qualifier
For a IsMemberAccess, what the member is of, as it is written: o of o.Item, .Items of .Items.Add, empty for the
.Add of a With block's object. Empty for a call of a name.
public string Qualifier { get; }
Property Value
Methods
Read(string)
Reads the call being written at the end of text.
public static SignatureSite? Read(string text)
Parameters
textstringThe text of the line, up to the cursor.
Returns
- SignatureSite
The call; null when the cursor is in none - or in a string literal, or in a comment.