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

feat(elixir): add support for elixir bitstrings #1219

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

c-alpha
Copy link

@c-alpha c-alpha commented Sep 24, 2024

Elixir bitsrings are something I use often, but have been sorely absent from smartparens.

To complete the present PR, I would need a bit of a helping hand with creating test cases though.

Bitsrings are enclosed in << and >>, and in parsing can be mistaken for the operators <<~ and <<<. Thus, << followed by anything but ~ or < starts a bitsring.

Examples:

  • <<tag::5, length::2, mandatory::1>> = data parses the first eight bits in data
  • the bitsring can also be padded with whitespace and/or split across lines:
<<
  tag::5,
  length::2,
  mandatory::1
>> = data
  • not bitsrings are a <<< b and a <<~ b

Where can I find examples and documentation for creating test cases?

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.

1 participant