glue 0.3.1

Glue is a parser combinator library that is designed for parsing text based formats with speed and efficiency.
Documentation
# Glue

[![Build Status](https://travis-ci.org/anarchistmae/glue-rs.svg?branch=master)](https://travis-ci.org/anarchistmae/glue-rs)
[![Latest Version](https://img.shields.io/crates/v/glue.svg)](https://crates.io/crates/glue)
[![Documentation](https://docs.rs/glue/badge.svg)](https://docs.rs/glue)
[![Minimum rustc version](https://img.shields.io/badge/rustc-1.32+-yellow.svg)](https://github.com/anarchistmae/glue-rs)
[![License:MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
![lines of code](https://tokei.rs/b1/github/anarchistmae/glue-rs)

Glue is a parser combinator library that is designed for parsing text based formats with speed and efficiency.

# Usage

```rust
use glue::prelude::*;

let input = Context::from("foobar");

match merge(one_or_more(is(alphabetic))).parse(input) {
    Ok((input, token)) => {
        println!("Found: {}", token.as_str());
    },
    Err(_) => {
        println!("Nothing found!");
    }
}
```

### Writing your own parser functions

```rust
use glue::prelude::*;

#[derive(Debug, PartialEq)]
enum Token {
    Identifier(String),
}

fn identifier<'i>() -> impl Parser<'i, Token> {
    move |input: Context<'i>| {
        let (input, token) = merge(one_or_more(is(alphabetic))).parse(input)?;

        Ok((input, Token::Identifier(token.into())))
    }
}

let input = Context::from("foobar");

assert_eq!(identifier().parse(input), Ok((
    Context {
        input: "foobar",
        start: 6,
        end: 6,
    },
    Token::Identifier("foobar".into()),
)));
```