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

Syntax error with silly if/else #13

Open
pvdz opened this issue May 12, 2014 · 1 comment
Open

Syntax error with silly if/else #13

pvdz opened this issue May 12, 2014 · 1 comment

Comments

@pvdz
Copy link
Owner

pvdz commented May 12, 2014

if (x);
else if (y) {
  haha
}
else ;

the transformation will cause unexpected token else

 { $statement$(0, 0); if ($expression$(0, 3, (x)))$statement$(0, 5); ;
else  { $statement$(0, 9); if ($expression$(0, 12, (y)))  { $statement$(0, 15); {
  $expression$(0, 19, (haha))

;$statement$(0, 22); } } 
else $statement$(0, 26); ; }  } 

floops

@pvdz
Copy link
Owner Author

pvdz commented May 12, 2014

Actually it's due to the semi statement :s

if (a);
else b;

=>

{ $statement$(0, 8); if ($expression$(0, 11, (a)))$statement$(0, 13); ;
else $expression$(0, 25, (b)); } 

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

No branches or pull requests

1 participant