Fix number parsing.

This commit is contained in:
Stephen Chung
2020-03-03 21:39:25 +08:00
parent 9f80bf03c4
commit 71a3c79915
4 changed files with 133 additions and 69 deletions

View File

@@ -34,9 +34,24 @@
// needs to be here, because order matters for macros
macro_rules! debug_println {
() => (#[cfg(feature = "debug_msgs")] {print!("\n")});
($fmt:expr) => (#[cfg(feature = "debug_msgs")] {print!(concat!($fmt, "\n"))});
($fmt:expr, $($arg:tt)*) => (#[cfg(feature = "debug_msgs")] {print!(concat!($fmt, "\n"), $($arg)*)});
() => (
#[cfg(feature = "debug_msgs")]
{
print!("\n");
}
);
($fmt:expr) => (
#[cfg(feature = "debug_msgs")]
{
print!(concat!($fmt, "\n"));
}
);
($fmt:expr, $($arg:tt)*) => (
#[cfg(feature = "debug_msgs")]
{
print!(concat!($fmt, "\n"), $($arg)*);
}
);
}
mod any;
@@ -50,6 +65,6 @@ mod scope;
pub use any::Dynamic;
pub use engine::{Array, Engine, EvalAltResult};
pub use scope::Scope;
pub use fn_register::{RegisterDynamicFn, RegisterFn};
pub use parser::{ParseError, ParseErrorType, AST};
pub use scope::Scope;