pub use option_ext::UncheckedOptionExt; use std::fmt::Display; use sexp::{Sexp, Atom}; use std::str::FromStr; mod option_ext; /// Convert a string token to Sexp #[allow(non_snake_case)] pub fn A(s: impl Display) -> Sexp { let s = s.to_string(); let x: Result = FromStr::from_str(&s); if let Ok(x) = x { return Sexp::Atom(Atom::I(x)); } let y: Result = FromStr::from_str(&s); if let Ok(y) = y { return Sexp::Atom(Atom::F(y)); } Sexp::Atom(Atom::S(s)) }