Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support of nested types #53

Closed
MarcoEidinger opened this issue Jan 5, 2023 · 0 comments · Fixed by #55
Closed

Support of nested types #53

MarcoEidinger opened this issue Jan 5, 2023 · 0 comments · Fixed by #55
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@MarcoEidinger
Copy link
Owner

MarcoEidinger commented Jan 5, 2023

Enumerations are often created to support a specific class or structure’s functionality. Similarly, it can be convenient to define utility classes and structures purely for use within the context of a more complex type. To accomplish this, Swift enables you to define nested types, whereby you nest supporting enumerations, classes, and structures within the definition of the type they support.

To nest a type within another type, write its definition within the outer braces of the type it supports. Types can be nested to as many levels as are required.

Nested Types do not get rendered by SwiftPlantUML

Ideally, there would be an option to render them.

Example Input

public struct OuterOuter {
    public struct Outer {
        public enum Inner {}
    }
}

Possible Output

PossibleOutput

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant