commit | f7df57c5c9d9b8e1bfeb9c9cff24ed6726f0ac73 | [log] [tgz] |
---|---|---|
author | Alex Crichton <alex@alexcrichton.com> | Sun Jan 21 21:05:11 2018 -0800 |
committer | Alex Crichton <alex@alexcrichton.com> | Sun Jan 21 21:05:11 2018 -0800 |
tree | 0a4e005aabbc53fb62efeffde5813ed756d8a9ba | |
parent | 8c03033828a614775017f078a01f2c457957975b [diff] |
Add a special case for empty `/*` comments Looks like they didn't fall into quite the right position! Closes #57
diff --git a/src/strnom.rs b/src/strnom.rs index 1bf9f23..33964f4 100644 --- a/src/strnom.rs +++ b/src/strnom.rs
@@ -80,6 +80,9 @@ continue; } break; + } else if s.starts_with("/**/") { + i += 4; + continue } else if s.starts_with("/*") && (!s.starts_with("/**") || s.starts_with("/***")) && !s.starts_with("/*!") { let (_, com) = block_comment(s)?;