Update dependencies (and fix unrelated build warning)
This commit is contained in:
parent
4e5d7474b3
commit
260ea03727
5 changed files with 7 additions and 24 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -124,7 +124,7 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bliss-audio"
|
name = "bliss-audio"
|
||||||
version = "0.4.4"
|
version = "0.4.6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"bliss-audio-aubio-rs",
|
"bliss-audio-aubio-rs",
|
||||||
|
|
2
bliss-rs
2
bliss-rs
|
@ -1 +1 @@
|
||||||
Subproject commit 1f101b5975f923d3a13a9d122c0f19a91e6d0b82
|
Subproject commit 8517c49caf3a636798411da3c0a3d80b2cf268d5
|
|
@ -2,9 +2,7 @@ use std::collections::VecDeque;
|
||||||
//use std::fmt::{Debug, Display, Error, Formatter};
|
//use std::fmt::{Debug, Display, Error, Formatter};
|
||||||
use std::marker::PhantomData;
|
use std::marker::PhantomData;
|
||||||
|
|
||||||
#[cfg(debug_assertions)]
|
use crate::lang::utility::{assert_token, assert_token_raw};
|
||||||
use crate::lang::utility::assert_empty;
|
|
||||||
use crate::lang::utility::{assert_token, assert_token_raw, assert_token_raw_back};
|
|
||||||
use crate::lang::MpsLanguageDictionary;
|
use crate::lang::MpsLanguageDictionary;
|
||||||
use crate::lang::SyntaxError;
|
use crate::lang::SyntaxError;
|
||||||
use crate::lang::{BoxedMpsOpFactory, MpsOp};
|
use crate::lang::{BoxedMpsOpFactory, MpsOp};
|
||||||
|
@ -68,10 +66,10 @@ impl<Op: MpsOp + 'static, F: MpsFunctionFactory<Op> + 'static> BoxedMpsOpFactory
|
||||||
tokens,
|
tokens,
|
||||||
)?;
|
)?;
|
||||||
assert_token_raw(MpsToken::OpenBracket, tokens)?;
|
assert_token_raw(MpsToken::OpenBracket, tokens)?;
|
||||||
assert_token_raw_back(MpsToken::CloseBracket, tokens)?;
|
let end_tokens = tokens.split_off(tokens.len()-1);
|
||||||
let func = self.op_factory.build_function_params(name, tokens, dict)?;
|
let func = self.op_factory.build_function_params(name, tokens, dict)?;
|
||||||
#[cfg(debug_assertions)]
|
tokens.extend(end_tokens);
|
||||||
assert_empty(tokens)?;
|
assert_token_raw(MpsToken::CloseBracket, tokens)?;
|
||||||
Ok(Box::new(func))
|
Ok(Box::new(func))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -169,17 +169,6 @@ pub fn assert_type(tokens: &mut VecDeque<MpsToken>) -> Result<MpsTypePrimitive,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn assert_empty(tokens: &mut VecDeque<MpsToken>) -> Result<(), SyntaxError> {
|
|
||||||
match tokens.pop_front() {
|
|
||||||
None => Ok(()),
|
|
||||||
Some(t) => Err(SyntaxError {
|
|
||||||
line: 0,
|
|
||||||
token: MpsToken::Name("{nothing}".into()),
|
|
||||||
got: Some(t),
|
|
||||||
}),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn music_folder() -> PathBuf {
|
pub fn music_folder() -> PathBuf {
|
||||||
dirs::home_dir()
|
dirs::home_dir()
|
||||||
.unwrap_or_else(|| PathBuf::from("./"))
|
.unwrap_or_else(|| PathBuf::from("./"))
|
||||||
|
|
|
@ -5,8 +5,6 @@ use std::iter::Iterator;
|
||||||
use crate::tokens::MpsToken;
|
use crate::tokens::MpsToken;
|
||||||
use crate::MpsContext;
|
use crate::MpsContext;
|
||||||
|
|
||||||
#[cfg(debug_assertions)]
|
|
||||||
use crate::lang::utility::assert_empty;
|
|
||||||
use crate::lang::MpsLanguageDictionary;
|
use crate::lang::MpsLanguageDictionary;
|
||||||
use crate::lang::{MpsFunctionFactory, MpsFunctionStatementFactory, MpsIteratorItem, MpsOp};
|
use crate::lang::{MpsFunctionFactory, MpsFunctionStatementFactory, MpsIteratorItem, MpsOp};
|
||||||
use crate::lang::{RuntimeError, SyntaxError};
|
use crate::lang::{RuntimeError, SyntaxError};
|
||||||
|
@ -72,12 +70,10 @@ impl MpsFunctionFactory<EmptyStatement> for EmptyFunctionFactory {
|
||||||
fn build_function_params(
|
fn build_function_params(
|
||||||
&self,
|
&self,
|
||||||
_name: String,
|
_name: String,
|
||||||
#[allow(unused_variables)] tokens: &mut VecDeque<MpsToken>,
|
_tokens: &mut VecDeque<MpsToken>,
|
||||||
_dict: &MpsLanguageDictionary,
|
_dict: &MpsLanguageDictionary,
|
||||||
) -> Result<EmptyStatement, SyntaxError> {
|
) -> Result<EmptyStatement, SyntaxError> {
|
||||||
// empty()
|
// empty()
|
||||||
#[cfg(debug_assertions)]
|
|
||||||
assert_empty(tokens)?;
|
|
||||||
Ok(EmptyStatement { context: None })
|
Ok(EmptyStatement { context: None })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue