1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//! A `Span` represents a location in source file.
//!
//! Spans are useful for reporting error messages. They're used during parsing
//! and are carried around in the `Sexp` type so that errors can be reported at
//! a higher level than the s-expressions, for example reporting semantic errors
//! in a Lisp implementation.
/// Represents a way of talking about a region in the source.
///
/// All spans begin at a point in the source and contain some (possibly empty)
/// amount of text.
/// `ByteSpan` is a very simple span, and the default for all of the parsers in
/// Ess.
///
/// It represents a half-open range of bytes, the first element is the first
/// byte in the span and the second element is the first by after the span. This
/// means that `&text[span.0..span.1]` works exactly as we would expect it to.
pub type ByteSpan = ;