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

Error with bitwise NOT operator inside binary #15

Open
eksperimental opened this issue Apr 3, 2021 · 0 comments
Open

Error with bitwise NOT operator inside binary #15

eksperimental opened this issue Apr 3, 2021 · 0 comments

Comments

@eksperimental
Copy link
Contributor

bitstring(Var) ->
  <<(bnot Var)/integer>>.

is transpiled as:

  defp bitstring(var) do
    <<~~~ var :: integer>>
  end

and you will get a compile error.
unexpected token: "~" (column 8, code point U+007E)

it should use parenthesis (and preferable leave lo space between the operator and the term with the bitwise operators in general.)
<<(~~~var) :: integer>>

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

1 participant