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

Keep // comments #108

Closed
charlieMonroe opened this issue Oct 22, 2015 · 4 comments
Closed

Keep // comments #108

charlieMonroe opened this issue Oct 22, 2015 · 4 comments

Comments

@charlieMonroe
Copy link

Is there a reason why /* */ comments within code are kept and // comments aren't?

@drkameleon
Copy link
Collaborator

Nice that you mention it, since someone also noted that (in an e-mail sent to me). And the whole issue is somewhat related to: #94

Basically:

  • /* * are recognized (and converted), when they are top-level statements
  • // are ignored

My intention currently is to make iSwift recognize // full-line (meaning: a line beginning with //).

And the rest of it (comments being embedded within the statement tree) may follow.

@jrmgx
Copy link

jrmgx commented Oct 28, 2015

+1

Any comments (of any type) should stay after the translation :)

@JanX2
Copy link

JanX2 commented Oct 29, 2015

+1

@drkameleon
Copy link
Collaborator

Issue fixed as of the upcoming 2.0.


NOTE: Both multi-line and single-line comments will be converted in all cases. With one catch: the comments must not "break" any legal statement in the middle (this will throw an error). e.g.

for (int i=0; i<10; i++) // this won't work
{
}

for (int i=0; i<10; i++) { // this will work
}

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