Skip to content

Commit

Permalink
change the implicit/explicitDocument union in Event to a field+alias
Browse files Browse the repository at this point in the history
  • Loading branch information
Herringway committed Jun 2, 2024
1 parent ba5a932 commit 988132a
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions source/dyaml/event.d
Original file line number Diff line number Diff line change
Expand Up @@ -68,17 +68,14 @@ struct Event
EventID id = EventID.invalid;
///Style of scalar event, if this is a scalar event.
ScalarStyle scalarStyle = ScalarStyle.invalid;
union
{
///Should the tag be implicitly resolved?
bool implicit;
/**
* Is this document event explicit?
*
* Used if this is a DocumentStart or DocumentEnd.
*/
bool explicitDocument;
}
///Should the tag be implicitly resolved?
bool implicit;
/**
* Is this document event explicit?
*
* Used if this is a DocumentStart or DocumentEnd.
*/
alias explicitDocument = implicit;
///Collection style, if this is a SequenceStart or MappingStart.
CollectionStyle collectionStyle = CollectionStyle.invalid;

Expand Down

0 comments on commit 988132a

Please sign in to comment.