ZoneCodeGenerator: Make unions work with conditions and only load one union member at a time consistently

This commit is contained in:
Jan
2019-12-06 16:33:05 +01:00
parent f4a2639e30
commit 9253ac14fa
9 changed files with 196 additions and 17 deletions

View File

@ -73,6 +73,12 @@ namespace ZoneCodeGenerator.Generating.Computations
public bool IsNotDefaultNormalBlock =>
information.Block != null && !(information.Block.IsNormal && information.Block.IsDefault);
public bool IsFirstMember =>
information.Parent.OrderedMembers.FirstOrDefault(member => !member.IsLeaf && !member.Computations.ShouldIgnore) == information;
public bool IsLastMember =>
information.Parent.OrderedMembers.LastOrDefault(member => !member.IsLeaf && !member.Computations.ShouldIgnore) == information;
public MemberReferenceComputations References => new MemberReferenceComputations(information);
public MemberComputations(MemberInformation information)