+2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
+
+ * repinfo.adb (List_Record_Layout): Be prepared for JSON output.
+ (List_Record_Info): Use the flat representation for record
+ subtypes in the JSON format.
+
2018-09-26 Justin Squirek <squirek@adacore.com>
* lib-writ.adb, lib-writ.ads (Write_With_Lines): Add
Starting_First_Bit : Uint := Uint_0;
Prefix : String := "")
is
- Comp : Entity_Id;
+ Comp : Entity_Id;
+ First : Boolean := True;
begin
Comp := First_Component_Or_Discriminant (Ent);
goto Continue;
end if;
+ if List_Representation_Info_To_JSON then
+ if First then
+ Write_Eol;
+ First := False;
+ else
+ Write_Line (",");
+ end if;
+ end if;
+
List_Component_Layout (Comp,
Starting_Position, Starting_First_Bit, Prefix);
end;
Write_Line (",");
Write_Str (" ""record"": [");
- List_Structural_Record_Layout (Ent, Ent);
+ if Is_Base_Type (Ent) then
+ List_Structural_Record_Layout (Ent, Ent);
+ else
+ List_Record_Layout (Ent);
+ end if;
Write_Eol;
Write_Str (" ]");