Coder Social home page Coder Social logo

bs-flow-parser's Introduction

bs-flow-parser

This is Flow's parser modified and packaged for BuckleScript. The changes that have been made are not alterations to how the Flow parser works, but simply to get it to compile, mostly due to BuckleScript's older version of OCaml.

NOTE: The most significant alterations can be seen by going back to this repo's commit that adds the original Flow parser source files that were needed for the basic parser and lexer. A patch file that summarises the changes can be found here.

Furthermore the modules that will probably interest you as they're the entrypoint modules, Flow_parser and Flow_parser_js, are fully customised.

The entire package is namespaced to BsFlowParser. It can be installed from npm: yarn add bs-flow-parser or npm install --save bs-flow-parser, after which you can add the module to your bsconfig.json:

{
  "name": "<your name>",
  "version": "0.1.0",
  "sources": ["src"],
  "bsc-flags": ["-bs-super-errors"],
  "bs-dependencies": [
+    "bs-flow-parser"
  ]
}

NOTE: If you're looking to use this package in JavaScript, it will work, but it's nonetheless recommended to use the official JSoO compiled version flow-parser

A small, non-scientific benchmark can be found here, tl;dr performance of the bundled parser seems to be on par with the JSoO version on npm.

bs-flow-parser's People

Contributors

austindd avatar kitten avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

zth austindd

bs-flow-parser's Issues

complete example of usage?

I'm trying to use flow-parser in my first reasonml project. I'm mostly using ocaml syntax so far.

Any chance you could add a complete example, starting from bsb init?

I'm currently struggling with...

~/projects/js2rho$ npm install bs-flow-parser
-- add to bsconfig.json dependencies...
~/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)

context: rchain-community/js2rho#2

Upgrading BuckleScript to 6.x?

Hi,

Thank you very much for this project! I was wondering, what're your thoughts on upgrading the BS platform depdendency to 6.x? What do you think would need to be done for it to work? I'd gladly do the work if you could point me in the right direction.

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.