Skip to content

Commit

Permalink
Fix strings with comments inside
Browse files Browse the repository at this point in the history
  • Loading branch information
kryptan committed Nov 16, 2018
1 parent 48a6440 commit 03c1c48
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions src/whitespace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,12 @@ pub fn sp(input: CompleteStr) -> IResult<CompleteStr, CompleteStr> {
macro_rules! ws (
($i:expr, $($args:tt)*) => ({
use $crate::whitespace::sp;
use $crate::nom::Convert;
use $crate::nom::Err;
use $crate::nom::lib::std::result::Result::*;

match sep!($i, sp, $($args)*) {
Err(e) => Err(e),
Ok((i1, o)) => {
match (sp)(i1) {
Err(e) => Err(Err::convert(e)),
Ok((i2, _)) => Ok((i2, o))
}
}
}
do_parse!($i,
sp >>
s: $($args)* >>
sp >>
(s)
)
});
);

0 comments on commit 03c1c48

Please sign in to comment.