about summary refs log tree commit diff stats
path: root/js/scripting-lang/baba-yaga-c/src/interpreter.c
diff options
context:
space:
mode:
authorelioat <elioat@tilde.institute>2025-08-01 21:34:49 -0400
committerelioat <elioat@tilde.institute>2025-08-01 21:34:49 -0400
commit5f99dfea8a4c2a95e3ea5008216823c7dcb43e73 (patch)
tree8c152530b73c2148d27e1dc4075578682d705f30 /js/scripting-lang/baba-yaga-c/src/interpreter.c
parent2cb7a6c779eb051e0a4d6afc08497ce6408948b5 (diff)
downloadtour-master.tar.gz
Diffstat (limited to 'js/scripting-lang/baba-yaga-c/src/interpreter.c')
-rw-r--r--js/scripting-lang/baba-yaga-c/src/interpreter.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/js/scripting-lang/baba-yaga-c/src/interpreter.c b/js/scripting-lang/baba-yaga-c/src/interpreter.c
index 58535f5..4b53e7d 100644
--- a/js/scripting-lang/baba-yaga-c/src/interpreter.c
+++ b/js/scripting-lang/baba-yaga-c/src/interpreter.c
@@ -686,6 +686,9 @@ Value interpreter_evaluate_expression(void* node, Scope* scope) {
                        strcmp(pattern_test_value.data.string, "_") == 0) {
                 /* Wildcard pattern always matches */
                 matches = true;
+            } else if (pattern_test_value.type == VAL_NIL && test_value.type == VAL_NIL) {
+                /* Both are nil - match */
+                matches = true;
             } else if (pattern_test_value.type == VAL_TABLE && test_value.type == VAL_TABLE) {
                 /* Table pattern matching: check if all pattern properties exist and match */
                 matches = true;
ious revision' href='/akkartik/mu/blame/counters.mu?h=hlt&id=ef7d834fdd826977cd8d43253052a7b8e1c5aa72'>^
897ae8c1 ^
b7830945 ^
b96af395 ^
d1c12218 ^
1ead3562 ^
77d5b5d6 ^
b96af395 ^
e5e3640c ^
b96af395 ^
e5e3640c ^
b96af395 ^
ce87c19e ^
192d59d3 ^

b96af395 ^
1ead3562 ^
50685c29 ^
b96af395 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29