summaryrefslogtreecommitdiff
path: root/src/eval/capture.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/capture.rs
parent891af17260a6750a74a102388a05e59cf1ffc3c1 (diff)
Many fixes
Diffstat (limited to 'src/eval/capture.rs')
-rw-r--r--src/eval/capture.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/eval/capture.rs b/src/eval/capture.rs
index 252e9b71..bbda96ad 100644
--- a/src/eval/capture.rs
+++ b/src/eval/capture.rs
@@ -43,8 +43,8 @@ impl<'a> CapturesVisitor<'a> {
match node.cast() {
// Every identifier is a potential variable that we need to capture.
// Identifiers that shouldn't count as captures because they
- // actually bind a new name are handled further below (individually
- // through the expressions that contain them).
+ // actually bind a new name are handled below (individually through
+ // the expressions that contain them).
Some(Expr::Ident(ident)) => self.capture(ident),
// Code and content blocks create a scope.
@@ -179,7 +179,7 @@ mod tests {
test("#import x, y from z", &["z"]);
test("#import x, y, z from x + y", &["x", "y"]);
- // Scoping.
+ // Blocks.
test("{ let x = 1; { let y = 2; y }; x + y }", &["y"]);
test("[#let x = 1]#x", &["x"]);
}