GithubHelp home page GithubHelp logo

forivall / tacoscript Goto Github PK

View Code? Open in Web Editor NEW
46.0 6.0 3.0 4.28 MB

:taco: The bidirectional alt-JS language

Home Page: http://tacoscript.github.io

License: MIT License

Shell 0.44% JavaScript 99.56%
parser cst babylon javascript alt-js ast-transformations generator coffeescript

tacoscript's Issues

Sourcemaps

  • Add tests
  • Properly pass options to comal

logical-assign: `or=`, `and=`

  • parse
  • transform
  • generate
    • expression
    • statement
  • clean up with comal-traverse Path features (.get) -- document it more.

Shorthand curry for functions that matches arrows

So consider the following:

const inject = (ƒunction) => (initial) => (iterable) => reduce(ƒunction, initial, iterable)

When using functions:

function inject (ƒunction) {
  return function injectWithInitial (initial) {
    return function injectWithInitialAndIterable (iterable) {
      return reduce(ƒunction, initial, iterable)
    }
  }
}

This can get cumbersome.

With tacoscript:

function inject(ƒunction) ->
  return function injectWithInitial (initial) ->
    return function injectWithInitialAndIterable (iterable) ->
      return reduce(ƒunction, initial, iterable)

Which becomes much easier to read, however consider the following improvement:

function inject(ƒunction) -> (initial) -> (iterable) ->
  return reduce(ƒunction, initial, iterable)

Whitespace preservation

  • Create CST when parsing
  • Add CST elements to Javascript AST
  • #20 - Create tacoscript generator that is CST aware
  • #21 - Create javascript generator that is CST aware
  • Preserve CST in transforms
    • first, manually in transforms - helpers in comal-types to set CST data
    • second, automatically in comal-traverse - place whitespace from nodes removed in "replaceWith" into their replacement nodes.
  • Analyse source CST and when converting to translated CST, try to use most commonly used pattern for given node pattern

Harden plugin API

  • Force plugins to provide their requirements in semver, & don't load
    incompatible plugins.
    • plugins should target comal version, parser name & version and generator name & version
      • generator should also declare if it needs cst info

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.