yapcol 0.1.0

Yet Another Parser Combinator Library - YAPCoL
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::*;

#[test]
fn success() {
	let tokens: Vec<String> = vec![];
	let mut input = Input::new(tokens);
	assert!(end_of_input()(&mut input).is_ok());
}

#[test]
fn fail() {
	let tokens = vec!["hello"];
	let mut input = Input::new(tokens);
	assert!(end_of_input()(&mut input).is_err());
}