Merge pull request #1942 from AleoHQ/doc-span

[span] Update and clarify some comments.
This commit is contained in:
d0cd 2022-07-18 11:19:02 -07:00 committed by GitHub
commit 3d65fc6263
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,10 +26,10 @@ use crate::symbol::with_session_globals;
/// This is used in many spots throughout the rest of the Leo crates. /// This is used in many spots throughout the rest of the Leo crates.
#[derive(Copy, Clone, Debug, Default, Deserialize, Eq, Hash, PartialEq, Serialize)] #[derive(Copy, Clone, Debug, Default, Deserialize, Eq, Hash, PartialEq, Serialize)]
pub struct Span { pub struct Span {
/// The start position of the span. /// The start (low) position of the span, inclusive.
pub lo: BytePos, pub lo: BytePos,
/// The end position of the span. /// The end (high) position of the span, exclusive.
/// The length is simply `end - start`. /// The length is simply `hi - lo`.
pub hi: BytePos, pub hi: BytePos,
} }