mod go;
mod unit;
pub use go::Go;
use harper_core::Span;
pub use unit::Unit;
fn without_intiators(source: &[char]) -> Span {
let actual_start = source
.iter()
.position(|c| !is_comment_character(*c))
.unwrap_or(0);
let actual_end = source.len()
- source
.iter()
.rev()
.position(|c| !is_comment_character(*c))
.unwrap_or(0);
Span::new(actual_start, actual_end)
}
fn is_comment_character(c: char) -> bool {
matches!(c, '#' | '-' | '/' | '*')
}