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

Matching binaries #26

Open
robertoaloi opened this issue Dec 5, 2022 · 1 comment
Open

Matching binaries #26

robertoaloi opened this issue Dec 5, 2022 · 1 comment

Comments

@robertoaloi
Copy link

Hi! I wonder if it would make sense/ be desirable to add support for matching binaries to the Redbug syntax. In addition to the following (already supported) syntax:

redbug:start("x:y(<<\"hello\">>)").

One could also write:

redbug:start("x:y(<<\"he\",_/binary>>)").

Or even something like:

redbug:start("wow:do(<<_:8,_:8,0,_/binary>>").
@massemanet
Copy link
Owner

massemanet commented Apr 17, 2023

Hi Roberto!

For some reason github doesn't notify me about new PRs (only new issues); so I haven't seen this (I'm not ignoring you).
I'm not completely sure how well this would be supported by the match spec syntax though. I suspect matching might be impossible(?). But I've considered using the erlang:binary_part guard function as a compile target.

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

No branches or pull requests

2 participants