text stringlengths 0 234 |
|---|
Sign.Keys; |
begin |
for J in 1 .. Attr_List.Length loop |
declare |
function "-" (Name : Wide_Wide_String) return LSP.Types.LSP_String; |
function "-" (Name : Wide_Wide_String) |
return LSP.Types.LSP_String is |
begin |
return Attr_List (J).To_Object.Value (+Name).To_String; |
end "-"; |
Item : LSP.Messages.CompletionItem; |
begin |
Item.label := -"label"; |
Item.detail := (True, -"detail"); |
Item.documentation := (True, -"documentation"); |
Item.sortText := (True, -"sortText"); |
Item.filterText := (True, -"filterText"); |
Item.insertText := (True, -"insertText"); |
if Item.insertText.Value.Index ('$') > 0 then |
Item.insertTextFormat := (True, LSP.Messages.Snippet); |
end if; |
Attr.Append (Item); |
Function Definition: overriding procedure Fill_Completion_List |
Function Body: (Self : Completion_Handler; |
Context : Ada_LSP.Completions.Context'Class; |
Result : in out LSP.Messages.CompletionList) |
is |
use Incr.Parsers.Incremental.Parser_Data_Providers; |
-- use type Incr.Nodes.Node_Access; |
Provider : constant Ada_LSP.Ada_Parser_Data.Provider_Access := |
Self.Context.Get_Parser_Data_Provider; |
Next_Action : constant Action_Table_Access := Provider.Actions; |
Next_State : constant State_Table_Access := Provider.States; |
State : Parser_State := 1; |
Token : constant Incr.Nodes.Tokens.Token_Access := Context.Token; |
Doc : constant Ada_LSP.Documents.Constant_Document_Access := |
Context.Document; |
Start : constant Incr.Nodes.Node_Access := |
Incr.Nodes.Node_Access (Doc.Start_Of_Stream); |
Now : constant Incr.Version_Trees.Version := Doc.History.Changing; |
List : Node_Lists.List; |
Subtree : Incr.Nodes.Node_Access := Token.Previous_Subtree (Now); |
begin |
while Subtree not in Start | null loop |
List.Prepend (Subtree); |
Subtree := Subtree.Previous_Subtree (Now); |
end loop; |
for Node of List loop |
State := Next_State (State, Node.Kind); |
end loop; |
for J in Incr.Nodes.Node_Kind'(1) .. 108 loop |
if Next_Action (State, J).Kind /= Error then |
declare |
Item : LSP.Messages.CompletionItem; |
begin |
Item.label := +Provider.Kind_Image (J); |
Item.kind := (True, LSP.Messages.Keyword); |
Result.items.Append (Item); |
Function Definition: not overriding procedure Read_dynamicRegistration |
Function Body: (S : access Ada.Streams.Root_Stream_Type'Class; |
V : out dynamicRegistration) |
is |
JS : League.JSON.Streams.JSON_Stream'Class renames |
League.JSON.Streams.JSON_Stream'Class (S.all); |
begin |
JS.Start_Object; |
Read_Optional_Boolean |
(JS, +"dynamicRegistration", Optional_Boolean (V)); |
JS.End_Object; |
end Read_dynamicRegistration; |
------------------------------- |
-- Read_ExecuteCommandParams -- |
------------------------------- |
not overriding procedure Read_ExecuteCommandParams |
(S : access Ada.Streams.Root_Stream_Type'Class; |
V : out ExecuteCommandParams) |
is |
JS : League.JSON.Streams.JSON_Stream'Class renames |
League.JSON.Streams.JSON_Stream'Class (S.all); |
begin |
JS.Start_Object; |
Read_String (JS, +"command", V.command); |
JS.Key (+"arguments"); |
V.arguments := JS.Read; |
JS.End_Object; |
end Read_ExecuteCommandParams; |
--------------------------- |
-- Read_InitializeParams -- |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.