cygrind-utils 0.2.1

A utility crate for handling, parsing, and drawing cybergrind patterns from ULTRAKILL
Documentation
#![allow(dead_code)]

/// Validates a `.cgp` file, returning () or the ParseError
pub fn validate<S: AsRef<str>>(s: S) -> Result<(), parser::ParseError> {
    parser::parse(s)?;
    
    Ok(())
}

#[cfg(feature = "draw2d")]
pub mod draw2d;

/// Parser for the ULTRAKILL cyber grind pattern (cgp) format
pub mod parser;

/// Utilities for drawing patterns (extracting a colour from height information)
pub mod util;

#[cfg(test)]
mod test {
    use crate::parser::parse;

    use super::*;

    #[test]
    fn test_validate() {
        dbg!(parse(include_str! ("../example.cgp")).unwrap().to_pattern_string());
    }
}