Skip to content

String ") {" breaks subsequent tokens #481

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

Closed
basarat opened this issue Jul 22, 2015 · 8 comments
Closed

String ") {" breaks subsequent tokens #481

basarat opened this issue Jul 22, 2015 · 8 comments

Comments

@basarat
Copy link
Member

basarat commented Jul 22, 2015

E.g.

function write(str:string){
}

write(") {");
// var foo = 123;

Look like:

image

@basarat
Copy link
Member Author

basarat commented Jul 22, 2015

/cc @Cu3PO42 perhaps rule ordering is significant?

@Cu3PO42
Copy link
Member

Cu3PO42 commented Jul 24, 2015

I'll definitely look into this later today. Seems very weird to me, though.

@Cu3PO42
Copy link
Member

Cu3PO42 commented Jul 24, 2015

@basarat I actually can't reproduce this.

screen shot 2015-07-24 at 16 00 41

@basarat
Copy link
Member Author

basarat commented Jul 24, 2015

Try the "exact" code I posted. The code you posted is very different.

@Cu3PO42
Copy link
Member

Cu3PO42 commented Jul 25, 2015

I thought you were referring to the ){ at the end of the function definition for write and just added more tokens to confirm that wasn't broken. Sorry for that misunderstanding.

screen shot 2015-07-25 at 11 53 13

I can reproduce this now, however this is also broken in the transpired JavaScript as you can see above. I suspect this is a bug in the string definition method calling definition from the JS grammar. I'll investigate a bit and open an issue there if appropriate.

@basarat
Copy link
Member Author

basarat commented Jul 25, 2015

, however this is also broken in the transpired JavaScript as you can see above.

I half expected that 🌹 :)

@Cu3PO42
Copy link
Member

Cu3PO42 commented Jul 26, 2015

Right, the issue on the JavaScript grammar is still there, but I "manually" fixed it for TS files.

@winstliu
Copy link

I just fixed this in language-javascript so it should be out in the next Atom release.

@TypeStrong TypeStrong locked and limited conversation to collaborators Jan 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants