efx-core 1.0.0

Core parser and AST for EFx proc-macro
Documentation
1
2
3
4
5
6
7
8
9
10
11
/// Byte position in DSL source
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub struct Pos(pub usize);

/// Byte range [start, end]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub struct SpanRange { pub start: Pos, pub end: Pos }

impl SpanRange {
    pub fn new(start: usize, end: usize) -> Self { Self { start: Pos(start), end: Pos(end) } }
}