xuri / xgen

XSD (XML Schema Definition) parser and Go/C/Java/Rust/TypeScript code generator
BSD 3-Clause "New" or "Revised" License
313 stars 74 forks source link

Fix Skipped Groups After Addition of Choice Plurality Support #40

Closed alexandre-normand closed 2 years ago

alexandre-normand commented 2 years ago

PR Details

This fixes the issue identified by @xuri here.

Description

In the addition of support for choice plurality in https://github.com/xuri/xgen/pull/39, I had leftover copy-pasta that was setting the current element which interfered with the processing of groups. This removes the extra copy-pasted code that wasn't needed for processing choice elements and introduced the issue.

Related Issue

Motivation and Context

How Has This Been Tested

Types of changes

Checklist

xuri commented 2 years ago

Thanks for your quick fix.