GithubHelp home page GithubHelp logo

shift-js's Issues

Unhandled rejection TypeError:

I have this simple swift file:

❯ cat test.swift                                                                                                                                                                                                                                               
for x in "abc".characters {
  print(x)
}

It runs fine

❯ swift test.swift                                                                                                                                                                                                                                            
a
b
c

but it doesn't transpile using shift.js

❯ shift.js test.swift                                                                                                                                                                                                                                         
Unhandled rejection TypeError: Object #<Object> has no method 'error'
    at statement (/usr/local/lib/node_modules/shift.js/transpiler/parser/statement.js:74:7)
    at statements (/usr/local/lib/node_modules/shift.js/transpiler/parser/statements.js:23:9)
    at Object.std (/usr/local/lib/node_modules/shift.js/transpiler/parser/declarations.js:754:21)
    at statement (/usr/local/lib/node_modules/shift.js/transpiler/parser/statement.js:22:33)
    at statements (/usr/local/lib/node_modules/shift.js/transpiler/parser/statements.js:23:9)
    at parseTokenStream (/usr/local/lib/node_modules/shift.js/transpiler/parser/parser.js:102:13)
    at Object.api.compile (/usr/local/lib/node_modules/shift.js/transpiler/api.js:23:22)
    at /usr/local/lib/node_modules/shift.js/command.js:66:35
    at tryCatcher (/usr/local/lib/node_modules/shift.js/node_modules/bluebird/js/main/util.js:26:23)
    at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/shift.js/node_modules/bluebird/js/main/promise.js:507:31)
    at Promise._settlePromiseAt (/usr/local/lib/node_modules/shift.js/node_modules/bluebird/js/main/promise.js:581:18)
    at Promise._settlePromises (/usr/local/lib/node_modules/shift.js/node_modules/bluebird/js/main/promise.js:697:14)
    at Async._drainQueue (/usr/local/lib/node_modules/shift.js/node_modules/bluebird/js/main/async.js:123:16)
    at Async._drainQueues (/usr/local/lib/node_modules/shift.js/node_modules/bluebird/js/main/async.js:133:10)
    at Async.drainQueues (/usr/local/lib/node_modules/shift.js/node_modules/bluebird/js/main/async.js:15:14)
    at process._tickCallback (node.js:448:13)

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.