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

try scala.js / escalima; merge with tinysys2rho #2

Open
dckc opened this issue Apr 12, 2020 · 4 comments
Open

try scala.js / escalima; merge with tinysys2rho #2

dckc opened this issue Apr 12, 2020 · 4 comments

Comments

@dckc
Copy link
Contributor

dckc commented Apr 12, 2020

When I switched from .ts to @ts-check (#1), importing @types/estree types broke.

Plus, JavaScript is no match for ocaml when it comes to pattern matching in a compiler.

I don't see esprima nor estree in the redex | Reason Package Index, but the flow-parser is out there; e.g. packaged in npm.

@dckc
Copy link
Contributor Author

dckc commented Apr 12, 2020

When I switched from .ts to @ts-check (#1), importing @types/estree types broke.

@michaelfig suggested

... a type like {import('estree').SomeType}

I'm not sure I grok, but it's worth a try.

@dckc
Copy link
Contributor Author

dckc commented Apr 13, 2020

struggling... version skew?

~/projects/js2rho$ npm install bs-flow-parser
~/projects/js2rho$ npm run build
...

 bs-platform version mismatch Running bsb 7.2.2 (/home/connolly/projects/js2rho/node_modules/bs-platform) vs vendored 4.0.18 (/home/connolly/projects/js2rho/node_modules/@elliottcable/bs-gen/node_modules/bs-platform)

@dckc
Copy link
Contributor Author

dckc commented Apr 17, 2020

A scala implementation would be more helpful for adding js support to rnode. I did start on https://github.com/dckc/tinyses2rho in scala... but tinyses doesn't include await. Where are they on that issue? ... it's not among https://github.com/Agoric/Jessie/issues (tinyses got renamed to Jessie). I think they're pretty firmly against await; it doesn't make sufficiently clear which code runs in which turn

ooh... perfect! https://github.com/SrTobi/escalima JavaScript parser for scala, based on esprima.

some relevant tabs while I was researching:

@dckc dckc changed the title try reasonml / ocaml? estree types? try scala.js / escalima; merge with tinysys2rho Apr 17, 2020
@dckc
Copy link
Contributor Author

dckc commented Apr 18, 2020

dependency constraints are making escalima really challenging to use

I'm making more use of the jessica grammar, mixed in with es5 in estree.

https://github.com/rchain-community/js2rho/tree/scalajs 9df982c

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