fn comment(input: &str) -> IResult<&str, &str> {
    let (rest, comment) = spaced(preceded(tag("//"), is_not("\n\r")))(input)?;
    if rest.len() > 0 {
        let (rest, _) = one_of("\n\r")(rest)?; // consume the newline character
        return Ok((rest, comment));
    }
    Ok((rest, comment))
}
/// A comment allowed in selector files.
A comment allowed in selector files.
A comment allowed in selector files .
fn comment(input: &str) -> IResult<&str, &str> {
    let (rest, comment) = spaced(preceded(tag("//"), is_not("\n\r")))(input)?;
    if rest.len() > 0 {
        let (rest, _) = one_of("\n\r")(rest)?; // consume the newline character
        return Ok((rest, comment));
    }
    Ok((rest, comment))
}
fn comment ( input : & str ) -> IResult < & str , & str > { let ( rest , comment ) = spaced ( preceded ( tag ( " " ) , is_not ( " \n \r " ) ) ) ( input ) ? ; if rest . len ( ) > 0 { let ( rest , _ ) = one_of ( " \n \r " ) ( rest ) ? ; // consume the newline character return Ok ( ( rest , comment ) ) ; } Ok ( ( rest , comment ) ) }
A comment allowed in selector files.
A comment allowed in selector files .
input
&str
input
&str