rename serialization file (conflicts with serde)

This commit is contained in:
Breval Ferrari 2024-11-07 20:19:14 -05:00
parent 93067b3010
commit 9b2ad49f3b
No known key found for this signature in database
GPG key ID: 6FED68D87C479A59
3 changed files with 3 additions and 7 deletions

View file

@ -27,9 +27,9 @@ use thiserror::Error;
use utils::{inflate, InflateError}; use utils::{inflate, InflateError};
mod lex; mod lex;
mod ser; mod serialize;
mod utils; mod utils;
pub use ser::*; pub use serialize::*;
use super::Expression as Instruction; use super::Expression as Instruction;

View file

@ -40,11 +40,7 @@ impl Parse for Modifier {
pub fn flat_atom_parser(notes: &str) -> impl Parser<&str, FlatAtom, nom::error::Error<&str>> { pub fn flat_atom_parser(notes: &str) -> impl Parser<&str, FlatAtom, nom::error::Error<&str>> {
alt(( alt((
map_res( map_res(map_opt(one_of(notes), |c| notes.find(c)), u8::try_from).map(FlatAtom::Note),
map_opt(one_of(notes), |c| notes.find(dbg!(c))),
u8::try_from,
)
.map(FlatAtom::Note),
value(FlatAtom::Rest, char(Atom::REST)), value(FlatAtom::Rest, char(Atom::REST)),
value(FlatAtom::StartHere, char(Atom::START_HERE)), value(FlatAtom::StartHere, char(Atom::START_HERE)),
preceded(char(Atom::MODIFIER), Modifier::parse).map(FlatAtom::Modifier), preceded(char(Atom::MODIFIER), Modifier::parse).map(FlatAtom::Modifier),