Symbol#
Represent a symbol in the current file More...
import Script
Properties#
| Name | |
|---|---|
| string | description |
| Kind | kind |
| string | name |
| TextRange | range |
| TextRange | selectionRange |
Methods#
| Name | |
|---|---|
| bool | isClass() |
| bool | isFunction() |
| bool | select() |
Property Documentation#
string description#
Return more detail for this symbol, e.g the signature of a function.
Kind kind#
Return the kind of this symbol. Available symbol kinds are:
Symbol.FileSymbol.ModuleSymbol.NamespaceSymbol.PackageSymbol.ClassSymbol.MethodSymbol.PropertySymbol.FieldSymbol.ConstructorSymbol.EnumSymbol.InterfaceSymbol.FunctionSymbol.VariableSymbol.ConstantSymbol.StringSymbol.NumberSymbol.BooleanSymbol.ArraySymbol.ObjectSymbol.KeySymbol.NullSymbol.EnumMemberSymbol.StructSymbol.EventSymbol.OperatorSymbol.TypeParameter
string name#
Return the name of this symbol.
TextRange range#
The range enclosing this symbol not including leading/trailing whitespace but everything else like comments. This information is typically used to determine if the clients cursor is inside the symbol to reveal in the symbol in the UI.
TextRange selectionRange#
The range that should be selected and revealed when this symbol is being picked, e.g. the name of a function. Must be
contained by the range.
Method Documentation#
bool isClass()#
Returns whether this Symbol refers to a class or struct.
bool isFunction()#
Returns whether this Symbol refers to a function. This includes constructors and methods
bool select()#
Selects the current symbol.