Function tagua_parser::rules::comments::comment []

pub fn comment<'a>(i: &'a [u8]) -> IResult<&[u8]&[u8]u32>

Recognize all kind of comments.

A comment can be a single line (// or #) or a delimited block (/* … */).

Examples

use tagua_parser::Result;
use tagua_parser::rules::comments::comment;

assert_eq!(comment(b"/* foo */ bar"), Result::Done(&b" bar"[..], &b" foo "[..]));Run