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

DSL Style for Byte Array Creation #4

Merged
merged 8 commits into from Feb 7, 2022
Merged

DSL Style for Byte Array Creation #4

merged 8 commits into from Feb 7, 2022

Conversation

DrAma999
Copy link
Owner

Thanks to the ByteArrayBuilder now byte arrays and Data can be created using a specific DSL.
It also supports if, if else and for loops, see Unit Test for more detail
As an example this is valid:

Data {
        [Byte(0x00)]
        Byte(0x01)
        0x02
        [UInt8(0x03)]
        if clause {
            [UInt8](repeating: 0x04, count: 1)
        }
}

also this:

Array<Byte> {
        [Byte(0x00)]
        Byte(0x01)
        0x02
        [UInt8(0x03)]
        if clause {
            [UInt8](repeating: 0x04, count: 1)
        }
}

@DrAma999 DrAma999 added the enhancement New feature or request label Jan 31, 2022
@DrAma999 DrAma999 added this to the Byte Array DSL milestone Jan 31, 2022
@DrAma999 DrAma999 linked an issue Jan 31, 2022 that may be closed by this pull request
@DrAma999 DrAma999 marked this pull request as ready for review February 5, 2022 10:38
@DrAma999 DrAma999 self-assigned this Feb 5, 2022
Co-authored-by: samueleperricone <37908960+samueleperricone@users.noreply.github.com>
@DrAma999 DrAma999 merged commit f3fcff9 into develop Feb 7, 2022
@DrAma999 DrAma999 deleted the feature/DSL branch February 7, 2022 20:18
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 this pull request may close these issues.

Bit, Nibble, Byte, Word in DSL
2 participants