summaryrefslogtreecommitdiff
path: root/src/eval/methods.rs
diff options
context:
space:
mode:
authorMarmare314 <49279081+Marmare314@users.noreply.github.com>2023-04-06 15:26:09 +0200
committerGitHub <noreply@github.com>2023-04-06 15:26:09 +0200
commit0f8219b392e96d3cf7d784ee5d474274169d9918 (patch)
tree60ce53bb076b61b09184f4f1aefa2fa63ebb3ed2 /src/eval/methods.rs
parenta73149767c82509b77ccf6996ab0b1125cc9c249 (diff)
Unpacking syntax (#532)
Closes #341
Diffstat (limited to 'src/eval/methods.rs')
-rw-r--r--src/eval/methods.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/eval/methods.rs b/src/eval/methods.rs
index b88bca50..8b364fcb 100644
--- a/src/eval/methods.rs
+++ b/src/eval/methods.rs
@@ -116,6 +116,7 @@ pub fn call(
array.join(sep, last).at(span)?
}
"sorted" => Value::Array(array.sorted().at(span)?),
+ "enumerate" => Value::Array(array.enumerate()),
_ => return missing(),
},
@@ -297,6 +298,7 @@ pub fn methods_on(type_name: &str) -> &[(&'static str, bool)] {
("rev", false),
("slice", true),
("sorted", false),
+ ("enumerate", false),
],
"dictionary" => &[
("at", true),