starlane-space 0.3.19

The 'Space' portion of starlane as opposed to hyperspace. This is where 3rd parties customize Starlane's behavior with WebAssembly and external executables. To develop a starlane driver please look in `./starlane` which holds the 'hyperspace' code (which provides infrastructure)"
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use nom::{AsChar, InputTakeAtPosition};
use nom::error::ErrorKind;
use crate::space::parse::Res;
use crate::space::parse::util::Span;

pub(crate) fn lowercase1<T: Span>(i: T) -> Res<T, T>
where
    T: InputTakeAtPosition + nom::InputLength,
    <T as InputTakeAtPosition>::Item: AsChar,
{
    i.split_at_position1_complete(
        |item| {
            let char_item = item.as_char();
            !(char_item.is_alpha() && char_item.is_lowercase())
        },
        ErrorKind::Alpha,
    )
}