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

[DEV] Custom operators #3

Merged
merged 2 commits into from
Jun 29, 2024
Merged

[DEV] Custom operators #3

merged 2 commits into from
Jun 29, 2024

Conversation

MatrixEditor
Copy link
Owner

Version 2.0.1 adds support for user-defined operators and fixes an issue with the sizeof calculation of FormatFieldobjects.

Custom Operator (example)

from caterpillar.model import struct, sizeof
from caterpillar.fields import uint16, _infix_

# operator definition here (@_infix is also possible)
M = _infix_(lambda _s, count: _s[count * 2])

@struct 
class Format:
    values: uint16 /M/ 3

---

+ Added a note to refer to necessary installation dependencies
+ Changed version to 2.0.1
@MatrixEditor MatrixEditor self-assigned this Jun 29, 2024
@MatrixEditor MatrixEditor merged commit b97fa32 into master Jun 29, 2024
6 checks passed
@MatrixEditor MatrixEditor deleted the dev/custom-ops branch June 29, 2024 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant