summaryrefslogtreecommitdiff
path: root/src/eval/scope.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-06-13 23:16:40 +0200
committerLaurenz <laurmaedje@gmail.com>2022-06-14 13:53:02 +0200
commitc81e2a5f56eb262663f292578c683fba7f18251f (patch)
tree6c045a8dcbec5e75e01a15f970ef8cee6ff042d0 /src/eval/scope.rs
parent891af17260a6750a74a102388a05e59cf1ffc3c1 (diff)
Many fixes
Diffstat (limited to 'src/eval/scope.rs')
-rw-r--r--src/eval/scope.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/eval/scope.rs b/src/eval/scope.rs
index 29778a90..7c624de0 100644
--- a/src/eval/scope.rs
+++ b/src/eval/scope.rs
@@ -122,7 +122,7 @@ impl Debug for Scope {
}
}
-/// A slot where a variable is stored.
+/// A slot where a value is stored.
#[derive(Clone, Hash)]
struct Slot {
/// The stored value.
@@ -141,17 +141,17 @@ enum Kind {
}
impl Slot {
- /// Create a new constant slot.
+ /// Create a new slot.
fn new(value: Value, kind: Kind) -> Self {
Self { value, kind }
}
- /// Read the variable.
+ /// Read the value.
fn read(&self) -> &Value {
&self.value
}
- /// Try to write to the variable.
+ /// Try to write to the value.
fn write(&mut self) -> StrResult<&mut Value> {
match self.kind {
Kind::Normal => Ok(&mut self.value),