summaryrefslogtreecommitdiff
path: root/src/model
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-02-17 16:32:48 +0100
committerLaurenz <laurmaedje@gmail.com>2023-02-17 16:32:48 +0100
commit028632a3a10202ee21eaaf7ecf13ca7fe331106e (patch)
treeecba2b74b52b2c94b8ccf63dc8099d8ef608081c /src/model
parentdd5f07eb9110cc5e19dcb4441743a323128426fc (diff)
Fix error handling after hashtag
Diffstat (limited to 'src/model')
-rw-r--r--src/model/func.rs10
-rw-r--r--src/model/value.rs2
2 files changed, 6 insertions, 6 deletions
diff --git a/src/model/func.rs b/src/model/func.rs
index c5bab64c..9583f6fd 100644
--- a/src/model/func.rs
+++ b/src/model/func.rs
@@ -517,16 +517,16 @@ mod tests {
fn test_captures() {
// Let binding and function definition.
test("#let x = x", &["x"]);
- test("#let x; #{x + y}", &["y"]);
+ test("#let x; #(x + y)", &["y"]);
test("#let f(x, y) = x + y", &[]);
test("#let f(x, y) = f", &[]);
test("#let f = (x, y) => f", &["f"]);
// Closure with different kinds of params.
- test("#{(x, y) => x + z}", &["z"]);
- test("#{(x: y, z) => x + z}", &["y"]);
- test("#{(..x) => x + y}", &["y"]);
- test("#{(x, y: x + z) => x + y}", &["x", "z"]);
+ test("#((x, y) => x + z)", &["z"]);
+ test("#((x: y, z) => x + z)", &["y"]);
+ test("#((..x) => x + y)", &["y"]);
+ test("#((x, y: x + z) => x + y)", &["x", "z"]);
test("#{x => x; x}", &["x"]);
// Show rule.
diff --git a/src/model/value.rs b/src/model/value.rs
index b860a3f6..dff27fde 100644
--- a/src/model/value.rs
+++ b/src/model/value.rs
@@ -133,7 +133,7 @@ impl Value {
format_str!("{:?}", self)
}
- /// Attach a span to the value, if possibly.
+ /// Attach a span to the value, if possible.
pub fn spanned(self, span: Span) -> Self {
match self {
Value::Content(v) => Value::Content(v.spanned(span)),