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

if then else bug #33

Closed
ssatguru opened this issue Jan 17, 2016 · 3 comments
Closed

if then else bug #33

ssatguru opened this issue Jan 17, 2016 · 3 comments
Assignees
Labels
Milestone

Comments

@ssatguru
Copy link

following

package org.ssatguru.babylonjs;
import static jsweet.dom.Globals.console;
public class CodeSnippet {
    public static void main(String args[]){
        int i =1;
        if (i==1)console.log("is true");
        else console.log("is false");
    }
}

gives following error during TS compile

[INFO] JSweet transpiler version 1.0.0-SNAPSHOT (build date: 2016-01-16 10:30:13)
ERROR: ';' expected. at org\ssatguru\babylonjs\CodeSnippet.ts(6)
[ERROR] transpilation failed
@renaudpawlak renaudpawlak added this to the 1.0.0-RC1 milestone Jan 17, 2016
@renaudpawlak renaudpawlak self-assigned this Jan 17, 2016
@renaudpawlak
Copy link
Contributor

Thank you for this one (good one). There is a lack of support for statements with optional blocks.

Temporary workaround: use blocks.

    if (i==1) { console.log("is true"); }
    else { console.log("is false"); }

I should be committing a fix very soon though.

@renaudpawlak
Copy link
Contributor

@ssatguru
Copy link
Author

Great,
Thanks

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

No branches or pull requests

2 participants