#![warn(missing_docs)]
extern crate ron_uuid as uuid;
extern crate smallvec;
#[macro_use]
extern crate log;
#[cfg(test)]
extern crate simple_logger;
pub mod atom;
pub mod batch;
pub mod crdt;
pub mod frame;
pub mod heap;
pub mod op;
pub use uuid::UUID;
pub use crate::atom::Atom;
pub use crate::batch::Batch;
pub use crate::crdt::{Set, CRDT, LWW};
pub use crate::frame::Frame;
pub use crate::heap::{FrameOrd, Heap};
pub use crate::op::{Op, Terminator};
fn scan_for_integer<'a>(input: &'a str) -> Option<usize> {
input.chars().position(|c| !c.is_ascii_digit() && c != '-' && c != '+')
}
fn scan_for_float<'a>(input: &'a str) -> Option<usize> {
input.chars().position(|c| {
!c.is_ascii_digit()
&& c != 'e'
&& c != 'E'
&& c != '.'
&& c != '-'
&& c != '+'
})
}
fn scan_for_string<'a>(input: &'a str) -> Option<usize> {
let mut escaped = false;
for (off, ch) in input.char_indices() {
escaped = match (ch, escaped) {
('\'', false) => return Some(off),
('\'', true) => false,
('\\', false) => true,
('\\', true) => false,
('n', true) => false,
('t', true) => false,
(_, false) => false,
(_, true) => false,
};
}
None
}