eirproject / eir

Erlang ecosystem common IR
Apache License 2.0
250 stars 8 forks source link

compiling type spec of binary fails #19

Closed johnsnewby closed 4 years ago

johnsnewby commented 5 years ago

Hi there,

compiling this file:

-module(test).
-type txs_hash() :: <<_:(32 * 8)>>.

fails with

newby@zen:~/projects/aeternity/eir$ ./target/debug/eir_compile  ../test.erl 
error: expected: ident, int
- <nofile>:2:25
2 | -type txs_hash() :: <<_:(32 * 8)>>.
  |                         ^ unrecognized token
hansihe commented 5 years ago

Thanks for reporting this!

I right in the middle of working on a optimization pass right now, but I will sort this out once that is done.

I am curious, are you looking at using the project for something in particular or are you just looking around?

johnsnewby commented 5 years ago

Hi there,

I work on the æternity blockchain, which is written in Erlang, and we're looking for ways to run our node, or parts of it, in browsers and mobile devices.

johnsnewby commented 4 years ago

Did you have a chance to look at this?

There is quite a lot of interest from our project in this one--maybe we could also contribute in some way if that would help get things done. Perhaps we can talk about this?

hansihe commented 4 years ago

I am mostly focused on working on compiler passes still, but i took a few minutes to fix this. The code you posted should be parsing on master.

Contributions are absolutely welcome! If you want to talk in a less formal setting, we are all in the #lumen channel on the elixir slack.