Skip to content

Commit

Permalink
Merge branch 'topic/vadim/syntax_sugar' into 'master'
Browse files Browse the repository at this point in the history
Use function instead of constant.

See merge request eng/ide/VSS!319
  • Loading branch information
godunko committed Feb 27, 2024
2 parents d1d86b1 + c48ba3b commit 50318b0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion source/text/vss-string_vectors.ads
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ package VSS.String_Vectors is
Constant_Indexing => Element,
Default_Iterator => Iterate,
Iterator_Element => VSS.Strings.Virtual_String,
Aggregate => (Empty => Empty_Virtual_String_Vector,
Aggregate => (Empty => Empty_Syntax_Sugar,
Add_Unnamed => Append_Syntax_Sugar),
Preelaborable_Initialization;

Expand Down Expand Up @@ -164,6 +164,10 @@ package VSS.String_Vectors is

-- Syntax sugar for Ada 2022 aggregates

function Empty_Syntax_Sugar return Virtual_String_Vector is
(Empty_Virtual_String_Vector);
-- Return an empty string vector

procedure Append_Syntax_Sugar
(Self : in out Virtual_String_Vector;
Item : VSS.Strings.Virtual_String);
Expand Down

0 comments on commit 50318b0

Please sign in to comment.