Code cleanups
This commit is contained in:
parent
8685faab8c
commit
94bd030958
|
@ -4,7 +4,7 @@ pub use date::Date;
|
||||||
// pub mod go;
|
// pub mod go;
|
||||||
|
|
||||||
mod tree;
|
mod tree;
|
||||||
use tree::parse_collection;
|
use tree::{parse_collection, Tree};
|
||||||
|
|
||||||
// mod game;
|
// mod game;
|
||||||
|
|
||||||
|
@ -18,8 +18,12 @@ pub enum Game {
|
||||||
Go(go::Game),
|
Go(go::Game),
|
||||||
Unsupported(tree::Tree),
|
Unsupported(tree::Tree),
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
pub fn parse_sgf(input: &str) -> Result<Vec<Game>, Error> {
|
pub fn parse_sgf(input: &str) -> Result<Vec<Tree>, Error> {
|
||||||
|
let (_, trees) = parse_collection::<nom::error::VerboseError<&str>>(input)?;
|
||||||
|
Ok(trees)
|
||||||
|
/*
|
||||||
let (_, trees) = parse_collection::<nom::error::VerboseError<&str>>(input)?;
|
let (_, trees) = parse_collection::<nom::error::VerboseError<&str>>(input)?;
|
||||||
Ok(trees
|
Ok(trees
|
||||||
.into_iter()
|
.into_iter()
|
||||||
|
@ -30,8 +34,8 @@ pub fn parse_sgf(input: &str) -> Result<Vec<Game>, Error> {
|
||||||
_ => Game::Unsupported(t),
|
_ => Game::Unsupported(t),
|
||||||
})
|
})
|
||||||
.collect::<Vec<Game>>())
|
.collect::<Vec<Game>>())
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
impl From<(&str, VerboseErrorKind)> for
|
impl From<(&str, VerboseErrorKind)> for
|
||||||
|
|
Loading…
Reference in New Issue