Skip to content

Conversation

@zydeco
Copy link
Contributor

@zydeco zydeco commented Nov 22, 2020

I've been working on a Capstone binding for Swift: capstone-swift.
Due to how Swift packages work, it must be in its own repository.

This required some additions to the const generator script to map constants in a more swift-like way:

  • Export related constants as an enum or OptionSet
  • Rename using Swift naming conventions
  • Swift enum values must be literals

These changes don't affect other bindings, but if it's inconvenient to have so much code in the const generator script only for Swift, I can keep it in my own repo.

* groups constants by enum
* use pascal case for enum names
* use camel case for enum values
* values are always literals
* add extra options for some enums
* use different types for some enums
* generate option sets instead of enums for some types
* renaming constants according to regex pattern
@XVilka
Copy link
Contributor

XVilka commented Nov 25, 2020

Would be a perfect addition to a possible "capstone-project" GitHub organization if @aquynh decides to make it happen: #1319 (comment)

@aquynh aquynh merged commit 6d5d982 into capstone-engine:next Nov 25, 2020
@aquynh
Copy link
Collaborator

aquynh commented Nov 25, 2020

merged, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants