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

Errors with valid ES6 import syntax #743

Open
glaba opened this issue Sep 15, 2017 · 3 comments
Open

Errors with valid ES6 import syntax #743

glaba opened this issue Sep 15, 2017 · 3 comments

Comments

@glaba
Copy link

glaba commented Sep 15, 2017

This results in an error:

module.js

export syntax hi = function(ctx) {
    return #`console.log('hello, world!')`;
}

file2.js

export const TEST = 3;

file.js

import { hi } from "./module.js";
import * as Test from "./file2.js";
hi;

Running sjs file.js results in

/usr/local/lib/node_modules/@sweet-js/cli/node_modules/shift-codegen/dist/token_stream.js:95
      var rightChar = tokenStr.charAt(0);
                               ^

TypeError: tokenStr.charAt is not a function
    at TokenStream.put (/usr/local/lib/node_modules/@sweet-js/cli/node_modules/shift-codegen/dist/token_stream.js:95:32)
    at Token.emit (/usr/local/lib/node_modules/@sweet-js/cli/node_modules/shift-codegen/dist/coderep.js:247:10)
    at /usr/local/lib/node_modules/@sweet-js/cli/node_modules/shift-codegen/dist/coderep.js:444:19
    at Array.forEach (native)
    at Seq.emit (/usr/local/lib/node_modules/@sweet-js/cli/node_modules/shift-codegen/dist/coderep.js:443:21)
    at /usr/local/lib/node_modules/@sweet-js/cli/node_modules/shift-codegen/dist/coderep.js:444:19
    at Array.forEach (native)
    at Seq.emit (/usr/local/lib/node_modules/@sweet-js/cli/node_modules/shift-codegen/dist/coderep.js:443:21)
    at codeGen (/usr/local/lib/node_modules/@sweet-js/cli/node_modules/shift-codegen/dist/index.js:153:7)
    at codegen (/usr/local/lib/node_modules/@sweet-js/cli/node_modules/@sweet-js/core/dist/codegen.js:16:38)
@wdanilo
Copy link

wdanilo commented Dec 8, 2017

Hi! Is there any progress regarding this issue? Is this library still being developed? I'm asking because the number of bug reports increases and there was no single commit in the past months :(

@disnet
Copy link
Member

disnet commented Dec 8, 2017

It's still being developed, just been busy the past few months. Hope to get some time soon.

@goranmoomin
Copy link

@disnet Okay, I know this project is inactive, but are there any plans (any) this project can revive?
I started studying sweet.js internals just for fun (after reading the Honu paper) for the past half year, and I progressed pretty much to the point where I understand most of sweet.js v1.0.0 code, but I figured out to understand the codebase to real I should write the whole thing myself.

I may be doing a rewrite of sweet.js (and make something similar), but I just wanted to ask if there is any possibility for sweet.js can revive. If it does, I would be better joining forces & helping on the bugs right now. If not, I would be proceeding to the rewrite!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants