diff options
Diffstat (limited to '')
-rw-r--r-- | spec/inputs/in_expression.yue | 2 | ||||
-rw-r--r-- | spec/outputs/in_expression.lua | 5 |
2 files changed, 7 insertions, 0 deletions
diff --git a/spec/inputs/in_expression.yue b/spec/inputs/in_expression.yue index 2756fe8..dacf820 100644 --- a/spec/inputs/in_expression.yue +++ b/spec/inputs/in_expression.yue | |||
@@ -4,6 +4,8 @@ a, b = x(...) not in [1, 3], 2 | |||
4 | 4 | ||
5 | d = (tb.x.y ...) not in [1, 3] | 5 | d = (tb.x.y ...) not in [1, 3] |
6 | 6 | ||
7 | has = "foo" in { "bar", "foo" } | ||
8 | |||
7 | if a in {1} and b in {2, 3, 4} or c in [1, 10] | 9 | if a in {1} and b in {2, 3, 4} or c in [1, 10] |
8 | print a, b, c | 10 | print a, b, c |
9 | 11 | ||
diff --git a/spec/outputs/in_expression.lua b/spec/outputs/in_expression.lua index 061431f..8b37a72 100644 --- a/spec/outputs/in_expression.lua +++ b/spec/outputs/in_expression.lua | |||
@@ -11,6 +11,11 @@ do | |||
11 | local _val_0 = (tb.x.y(...)) | 11 | local _val_0 = (tb.x.y(...)) |
12 | d = not (1 <= _val_0 and _val_0 <= 3) | 12 | d = not (1 <= _val_0 and _val_0 <= 3) |
13 | end | 13 | end |
14 | local has | ||
15 | do | ||
16 | local _val_0 = "foo" | ||
17 | has = "bar" == _val_0 or "foo" == _val_0 | ||
18 | end | ||
14 | if (1 == a) and (2 == b or 3 == b or 4 == b) or (function() | 19 | if (1 == a) and (2 == b or 3 == b or 4 == b) or (function() |
15 | local _val_0 = c | 20 | local _val_0 = c |
16 | return 1 <= _val_0 and _val_0 <= 10 | 21 | return 1 <= _val_0 and _val_0 <= 10 |