/// <summary> /// Try to match a given struct. /// Go down to find the first element of the same struct Type. /// </summary> private void LocateStruct(StructOrUnionType type) { while (!this.CurType.EqualType(type)) { if (this.CurType.IsScalar) { throw new InvalidOperationException("Trying to match a struct or union, but found a scalar."); } // Go down one level. this.indices.Add(0); } }
/// <summary> /// Try to match a given struct. /// Go down to find the first element of the same struct Type. /// </summary> private void LocateStruct(StructOrUnionType type) { while (!this.CurType.EqualType(type)) { if (this.CurType.IsScalar) { throw new InvalidOperationException("Trying to match a struct or union, but found a scalar."); } // Go down one level. this.indices.Add(0); } }