text stringlengths 0 234 |
|---|
if AWS.Response.Status_Code (Result) not in AWS.Messages.Success then |
Ada.Wide_Wide_Text_IO.Put_Line |
(AWS.Messages.Status_Code'Wide_Wide_Image |
(AWS.Response.Status_Code (Result))); |
Ada.Wide_Wide_Text_IO.Put_Line |
(AWS.Response.Content_Length_Type'Wide_Wide_Image |
(AWS.Response.Content_Length (Result))); |
Ada.Text_IO.Put_Line (AWS.Response.Content_Type (Result)); |
Ada.Text_IO.Put_Line (AWS.Response.Message_Body (Result)); |
raise Program_Error with "Unexpected response"; |
end if; |
declare |
Document : constant League.JSON.Documents.JSON_Document := |
League.JSON.Documents.From_JSON |
(AWS.Response.Message_Body (Result)); |
begin |
Access_Token := |
Document.To_JSON_Object.Value (+"access_token").To_String; |
Function Definition: procedure Offmt_Tool is |
Function Body: package Helpers renames Libadalang.Helpers; |
package LAL renames Libadalang.Analysis; |
package LALU renames Libadalang.Unparsing; |
package LALCO renames Libadalang.Common; |
package LALRW renames Libadalang.Rewriting; |
package LALEXPR renames Libadalang.Expr_Eval; |
All_Traces : Offmt_Lib.Trace_Map; |
function Base_Name (Full_Path : String) return String; |
procedure Setup (Ctx : Helpers.App_Context; |
Jobs : Helpers.App_Job_Context_Array); |
procedure Process_Unit (Job_Ctx : Helpers.App_Job_Context; |
Unit : LAL.Analysis_Unit); |
procedure Post_Process (Ctx : Helpers.App_Context; |
Jobs : Helpers.App_Job_Context_Array); |
procedure Output_Unit |
(Job_Ctx : Libadalang.Helpers.App_Job_Context; |
Unit : Libadalang.Analysis.Analysis_Unit; |
Out_Dir_Path : GNATCOLL.Strings.XString); |
procedure Output_Map (Map : Offmt_Lib.Trace_Map); |
function Map_Filename return String; |
procedure Handle_Log_Call (RH : LALRW.Rewriting_Handle; |
Node : LAL.Call_Stmt'Class); |
package App is new Helpers.App |
(Name => To_String (Offmt_Lib.Log_Root_Pkg), |
Description => "Offloaded string format", |
App_Setup => Setup, |
App_Post_Process => Post_Process, |
Process_Unit => Process_Unit); |
package Output_Dir is new GNATCOLL.Opt_Parse.Parse_Option |
(Parser => App.Args.Parser, |
Long => "--output-dir", |
Arg_Type => GNATCOLL.Strings.XString, |
Convert => GNATCOLL.Opt_Parse.Convert, |
Default_Val => GNATCOLL.Strings.Null_XString, |
Help => |
"The directory in which to output the instrumented ada units." |
& "When invoked with a project file, this path is treated as " |
& "relative to the (sub-)projects' object directories, unless " |
& "this is an absolute path."); |
Instr_Mode_Long : constant String := "--instrument"; |
Decode_Mode_Long : constant String := "--decode"; |
package Instrument_Mode is new GNATCOLL.Opt_Parse.Parse_Flag |
(Parser => App.Args.Parser, |
Long => Instr_Mode_Long, |
Help => "Enable instrumentation mode"); |
package Decode_Mode is new GNATCOLL.Opt_Parse.Parse_Flag |
(Parser => App.Args.Parser, |
Long => Decode_Mode_Long, |
Help => "Enable decode mode"); |
--------------- |
-- Base_Name -- |
--------------- |
function Base_Name (Full_Path : String) return String is |
use GNATCOLL.VFS; |
begin |
return +Create (+Full_Path).Base_Name; |
end Base_Name; |
------------------ |
-- Map_Filename -- |
------------------ |
function Map_Filename return String is |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.