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

Swift support #13

Closed
regexident opened this issue Jul 21, 2020 · 3 comments
Closed

Swift support #13

regexident opened this issue Jul 21, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@regexident
Copy link

This looks like a very cool tool! Congrats!

Would love to give it a ride with Swift.

Comments in Swift are very similar to comments in C. Single-line comments begin with two forward-slashes (//):

// This is a comment.

Multiline comments start with a forward-slash followed by an asterisk (/) and end with an asterisk followed by a forward-slash (/):

/* This is also a comment
but is written over multiple lines. */

Unlike multiline comments in C, multiline comments in Swift can be nested inside other multiline comments. You write nested comments by starting a multiline comment block and then starting a second multiline comment within the first block. > The second block is then closed, followed by the first block:

/* This is the start of the first multiline comment.
/* This is the second, nested multiline comment. */
This is the end of the first multiline comment. */

Nested multiline comments enable you to comment out large blocks of code quickly and easily, even if the code already > contains multiline comments.

Reference

The file extension of Swift source files is .swift.

@kiliankoe
Copy link

kiliankoe commented Jul 21, 2020

Swift also has a concept of documentation comments which begin with three slashes ///, but that's more of an editor concept (Xcode renders them differently) since they're already normal comments by starting with //. Just in case that makes a difference for the parser.

@preslavmihaylov
Copy link
Owner

The /// comments won't be an issue. But the nested multi-line comments are not supported in todocheck yet.

I'll need to extend the set of parsers for that one.

@preslavmihaylov
Copy link
Owner

closed by #17

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

No branches or pull requests

3 participants