Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions case035.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"expr": "λ($arg1, $arg2)<n+n:o>{{\"$arg1\": $arg1, \"$arg2\": $arg2}}(1, 2, 3)",
"dataset": null,
"bindings": {},
"result": {
"$arg1": 1,
"$arg2": 2
}
}
6 changes: 6 additions & 0 deletions case036.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"expr": "λ($arg1, $arg2, $arg3)<n+s:a<n>>{[$arg1, $arg2, $arg3]}(1, 2, \"a\")",
"dataset": null,
"bindings": {},
"result": [1, 2, "a"]
}
6 changes: 6 additions & 0 deletions case037.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"expr": "λ($arg1, $arg2, $arg3)<n+s-:a<n>>{[$arg1, $arg2, $arg3]}(1, 2, \"a\")",
"data": "b",
"bindings": {},
"result": [1, 2, "a"]
}
6 changes: 6 additions & 0 deletions case038.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"expr": "λ($arg1, $arg2, $arg3)<n+s-:a<n>>{[$arg1, $arg2, $arg3]}(1, 2)",
"data": "b",
"bindings": {},
"result": [1, 2, "b"]
}
9 changes: 9 additions & 0 deletions case039.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"expr": "λ($arg1, $arg2)<a<n>+:o>{{'$arg1': $arg1, '$arg2': $arg2}}([1, 2], [3, 4], [5, 6])",
"data": "b",
"bindings": {},
"result": {
"$arg1": [1, 2],
"$arg2": [3, 4]
}
}
6 changes: 6 additions & 0 deletions case040.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"expr": "λ($arg1, $arg2)<s?n+:a<n>>{[$arg1, $arg2]}(1, 2, 3)",
"dataset": null,
"bindings": {},
"result": [1, 2]
}
4 changes: 2 additions & 2 deletions src/signature.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,15 +252,15 @@ const signature = (() => {
argIndex++;
}
} else {
// may have matched multiple args (if the regex ends with a '+'
// may have matched multiple args (if the regex ends with a '+')
// split into single tokens
match.split('').forEach(function (single) {
arg = args[argIndex];
if (param.type === 'a') {
if (single === 'm') {
// missing (undefined)
arg = undefined;
} else {
arg = args[argIndex];
var arrayOK = true;
// is there type information on the contents of the array?
if (typeof param.subtype !== 'undefined') {
Expand Down