serde_jacl 0.3.3

Serialization and Deserialization of JACL
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use nom::{
    bytes::complete::{tag, take_until},
    combinator::value,
    error::ParseError,
    sequence::tuple,
    IResult,
};

pub fn multiline_comment<'a, E: ParseError<&'a str>>(i: &'a str) -> IResult<&'a str, (), E> {
    value((), tuple((tag("/*"), take_until("*/"), tag("*/"))))(i)
}

pub fn eol_comment<'a, E: ParseError<&'a str>>(i: &'a str) -> IResult<&'a str, (), E> {
    value((), tuple((tag("//"), take_until("\n"), tag("\n"))))(i)
}