forgot the no_std attr
This commit is contained in:
parent
be24d49c77
commit
ed3d696ebe
|
@ -1,8 +1,10 @@
|
||||||
|
use alloc::string::String;
|
||||||
|
|
||||||
|
use crate::alloc::string::ToString;
|
||||||
use crate::parse_list_of_floats;
|
use crate::parse_list_of_floats;
|
||||||
use crate::Expr;
|
use crate::Expr;
|
||||||
use crate::HashMap;
|
use crate::HashMap;
|
||||||
use crate::RispError;
|
use crate::RispError;
|
||||||
|
|
||||||
macro_rules! ensure_tonicity {
|
macro_rules! ensure_tonicity {
|
||||||
($check_fn:expr) => {{
|
($check_fn:expr) => {{
|
||||||
|args: &[Expr]| -> Result<Expr, RispError> {
|
|args: &[Expr]| -> Result<Expr, RispError> {
|
||||||
|
|
|
@ -1,10 +1,15 @@
|
||||||
use crate::lib::environ::env_get;
|
use alloc::format;
|
||||||
use crate::lib::Environ;
|
use alloc::string::String;
|
||||||
use crate::lib::Expr;
|
use alloc::string::ToString;
|
||||||
use crate::lib::HashMap;
|
use alloc::vec::Vec;
|
||||||
use crate::lib::RLambda;
|
|
||||||
use crate::lib::Rc;
|
use crate::environ::env_get;
|
||||||
use crate::lib::RispError;
|
use crate::Environ;
|
||||||
|
use crate::Expr;
|
||||||
|
use crate::HashMap;
|
||||||
|
use crate::RLambda;
|
||||||
|
use crate::Rc;
|
||||||
|
use crate::RispError;
|
||||||
|
|
||||||
pub fn eval(exp: &Expr, env: &mut Environ) -> Result<Expr, RispError> {
|
pub fn eval(exp: &Expr, env: &mut Environ) -> Result<Expr, RispError> {
|
||||||
match exp {
|
match exp {
|
||||||
|
|
17
src/lib.rs
17
src/lib.rs
|
@ -1,12 +1,23 @@
|
||||||
|
#![feature(slice_take)]
|
||||||
|
#![allow(special_module_name)]
|
||||||
|
#![feature(build_hasher_default_const_new)]
|
||||||
|
#![no_std]
|
||||||
use core::fmt;
|
use core::fmt;
|
||||||
|
|
||||||
use core::num::ParseFloatError;
|
use core::num::ParseFloatError;
|
||||||
// use std::hash::DefaultHasher;
|
// use std::hash::DefaultHasher;
|
||||||
|
|
||||||
|
use alloc::fmt::format;
|
||||||
|
use alloc::rc::Rc;
|
||||||
|
use alloc::string::String;
|
||||||
|
use alloc::string::ToString;
|
||||||
|
use alloc::vec::Vec;
|
||||||
pub use hashbrown::hash_map::HashMap;
|
pub use hashbrown::hash_map::HashMap;
|
||||||
|
pub extern crate alloc;
|
||||||
pub use std::io::Write;
|
use alloc::format;
|
||||||
pub use std::rc::Rc;
|
use alloc::vec;
|
||||||
|
// pub use alloc::;
|
||||||
|
// pub use core::rc::Rc;
|
||||||
|
|
||||||
mod environ;
|
mod environ;
|
||||||
pub use environ::default_env;
|
pub use environ::default_env;
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
use alloc::string::String;
|
||||||
|
use alloc::string::ToString;
|
||||||
|
use alloc::vec::Vec;
|
||||||
|
|
||||||
use crate::evaluate::eval;
|
use crate::evaluate::eval;
|
||||||
use crate::read_seq;
|
use crate::read_seq;
|
||||||
use crate::Environ;
|
use crate::Environ;
|
||||||
|
|
Loading…
Reference in a new issue