summaryrefslogtreecommitdiff
path: root/src/syntax/span.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2020-01-13 14:36:40 +0100
committerLaurenz <laurmaedje@gmail.com>2020-01-13 14:36:40 +0100
commitdde69276d47818174c35523c8ed86b6888b6d02b (patch)
tree68f0f56efd42f47156fddf67158cdcdcde3717b9 /src/syntax/span.rs
parent6527d31dfba78330a39e52d7772f6c8561fb23ef (diff)
Refactor expressions and create tuples and objects 🧮
Diffstat (limited to 'src/syntax/span.rs')
-rw-r--r--src/syntax/span.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/syntax/span.rs b/src/syntax/span.rs
index 10188ed4..e5c6912b 100644
--- a/src/syntax/span.rs
+++ b/src/syntax/span.rs
@@ -4,7 +4,7 @@ use std::fmt::{self, Display, Formatter};
/// Annotates a value with the part of the source code it corresponds to.
-#[derive(Copy, Clone, Eq, PartialEq)]
+#[derive(Copy, Clone, Eq, PartialEq, Hash)]
pub struct Spanned<T> {
pub v: T,
pub span: Span,
@@ -37,7 +37,7 @@ impl<T> Display for Spanned<T> where T: std::fmt::Debug {
debug_display!(Spanned; T where T: std::fmt::Debug);
/// Describes a slice of source code.
-#[derive(Copy, Clone, Eq, PartialEq)]
+#[derive(Copy, Clone, Eq, PartialEq, Hash)]
pub struct Span {
pub start: Position,
pub end: Position,