Function tagua_parser::rules::literals::binary []

pub fn binary(i: &[u8]) -> IResult<&[u8]Literalu32>

Recognize an integer with the binary notation.

Examples

use tagua_parser::Result;
use tagua_parser::ast::Literal;
use tagua_parser::rules::literals::binary;

assert_eq!(binary(b"0b101010"), Result::Done(&b""[..], Literal::Integer(42i64)));Run