added support for impure block comment styles #37

Merged
merged 1 commit into from Apr 20, 2011

Projects

None yet

2 participants

@hyperbolist

One-liner blocks:

/** comment */

Blocks starting with a comment:

/** comment
    and so on
 */

Blocks ending with a comment:

/**
   comment
   and so on */

Blocks ending with a comment and having a middle comment character:

/**
 * comment
 * and so on */

Blocks beginning and ending with a comment:

/** comment
    and so on */

Blocks beginning and ending with a comment and having a middle comment character:

/** comment
 *  and so on */
@mikewest
Collaborator

Looks fine to me, and you wrote tests!

I'm not entirely convinced of the usefulness of the one-line middle comment character parsing. Have you seen actual code written in that style where the middle character wasn't part of the comment (e.g. where the line splitting you're doing make sense)? I don't think I have...

@hyperbolist

At first I was really confused about what you were asking about, and then I noticed my initial comment's formatting was broken. Now I've fixed it. Does that make your concern go away?

The only real change I made was to recognize one-liner block comments and blocks that start or end with a comment. Those examples are just the test cases used to exercise it.

@mikewest
Collaborator

That makes much more sense. This looks like a decent addition, I'll merge it in shortly.

@hyperbolist

Great, thanks!

@mikewest mikewest added a commit to mikewest/rocco that referenced this pull request Apr 20, 2011
@mikewest mikewest Pulling in support for "impure" block comments
Closes issue #37
61d84c8
@mikewest mikewest merged commit c39dbd7 into rtomayko:master Apr 20, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment