mirror of
https://github.com/gorules/zen.git
synced 2026-10-04 08:02:28 +00:00
53 KiB
53 KiB
| 1 | role | unary | scope | expected | text | state | expected_tag | options | operators | replace_span | auto_open |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 2 | # Standard start | ||||||||||
| 3 | condition | false | bool | | | start | bool | 0..0 | true | |||
| 4 | condition | false | bool | ag| | start | bool | 0..2 | false | |||
| 5 | value | false | status | | | value | status | open=Open case,closed=Closed | 0..0 | true | ||
| 6 | value | false | number | | | value | number | 0..0 | true | |||
| 7 | value | false | | | start | 0..0 | true | |||||
| 8 | value | false | bool | | | value | bool | 0..0 | true | |||
| 9 | # Value after comparison operators | ||||||||||
| 10 | condition | false | bool | age == | | value | number | 7..7 | true | |||
| 11 | condition | false | bool | age != | | value | number | 7..7 | true | |||
| 12 | condition | false | bool | age > | | value | number | 6..6 | true | |||
| 13 | condition | false | bool | age >= | | value | number | 7..7 | true | |||
| 14 | condition | false | bool | age < | | value | number | 6..6 | true | |||
| 15 | condition | false | bool | age <= | | value | number | 7..7 | true | |||
| 16 | condition | false | bool | since < | | value | date | 8..8 | true | |||
| 17 | condition | false | bool | status == | | value | status | open=Open case,closed=Closed | 10..10 | true | ||
| 18 | condition | false | bool | status != | | value | status | open=Open case,closed=Closed | 10..10 | true | ||
| 19 | condition | false | bool | active == | | value | bool | 10..10 | true | |||
| 20 | condition | false | bool | status in | | value | status[] | open=Open case,closed=Closed | 10..10 | true | ||
| 21 | condition | false | bool | status not in | | value | status[] | open=Open case,closed=Closed | 14..14 | true | ||
| 22 | condition | false | bool | age == 1| | value | number | 7..8 | true | |||
| 23 | condition | false | bool | age > -| | value | number | 7..7 | true | |||
| 24 | condition | false | bool | age > -5| | value | number | 7..8 | true | |||
| 25 | condition | false | bool | (age > 1 and (status == | | value | status | open=Open case,closed=Closed | 24..24 | true | ||
| 26 | # Inside string literals | ||||||||||
| 27 | condition | false | bool | status in ['op| | inString | status | open=Open case | 11..14 | true | ||
| 28 | value | false | string | `Hel|lo` | inString | string | 0..7 | true | |||
| 29 | value | false | string | `Hello ${name}| | inString | string | 0..14 | true | |||
| 30 | # List elements and ranges | ||||||||||
| 31 | condition | false | bool | status in [| | listElement | status | open=Open case,closed=Closed | 11..11 | true | ||
| 32 | condition | false | bool | age in [| | listElement | number | 8..8 | true | |||
| 33 | condition | false | bool | age in [1..| | range | number | 11..11 | false | |||
| 34 | condition | false | bool | age in (1..| | range | number | 11..11 | false | |||
| 35 | condition | false | bool | age in [|..5] | range | number | 8..8 | false | |||
| 36 | condition | false | bool | since in [d()..| | range | date | 15..15 | false | |||
| 37 | condition | false | bool | since in [| | listElement | date | 10..10 | true | |||
| 38 | condition | false | bool | items[| | start | number | 6..6 | true | |||
| 39 | # Operator and logical after a finished operand | ||||||||||
| 40 | condition | false | bool | age | | operator | ==,!=,<,<=,>,>=,in,not in | 4..4 | true | |||
| 41 | # Operator menu opens after a complete operand (field path, literal, closed call) | ||||||||||
| 42 | condition | false | bool | grounding.status | | operator | ==,!=,in,not in | 17..17 | true | |||
| 43 | value | false | status | grounding.status | | operator | ==,!=,in,not in | 17..17 | true | |||
| 44 | condition | false | bool | customer.age | | operator | ==,!=,<,<=,>,>=,in,not in | 13..13 | true | |||
| 45 | condition | false | bool | len(x) | | operator | ==,!=,<,<=,>,>=,in,not in | 7..7 | true | |||
| 46 | condition | false | bool | name | | operator | ==,!=,in,not in | 5..5 | true | |||
| 47 | condition | false | bool | status | | operator | ==,!=,in,not in | 7..7 | true | |||
| 48 | condition | false | bool | tags | | operator | in,not in | 5..5 | true | |||
| 49 | condition | false | bool | customer.name | | operator | ==,!=,in,not in | 14..14 | true | |||
| 50 | condition | false | bool | amount | | operator | ==,!=,<,<=,>,>=,in,not in,?? | 7..7 | true | |||
| 51 | condition | false | bool | d() | | operator | ==,!=,<,<=,>,>=,in,not in | 4..4 | true | |||
| 52 | condition | false | bool | len(name) | | operator | ==,!=,<,<=,>,>=,in,not in | 10..10 | true | |||
| 53 | condition | false | bool | age + 1 | | operator | ==,!=,<,<=,>,>=,in,not in | 8..8 | true | |||
| 54 | condition | false | bool | active | | logical | bool | and,or,==,!= | 7..7 | true | ||
| 55 | condition | false | bool | not active | | logical | bool | and,or | 11..11 | true | ||
| 56 | condition | false | bool | (age > 1) | | logical | bool | and,or | 10..10 | true | ||
| 57 | condition | false | bool | age > 1 | | logical | bool | and,or | 8..8 | true | ||
| 58 | condition | false | bool | age > 1| | value | number | 6..7 | true | |||
| 59 | condition | false | bool | age > 1 + 2 | | logical | bool | and,or | 12..12 | true | ||
| 60 | condition | false | bool | age in [1..5] | | logical | bool | and,or | 14..14 | true | ||
| 61 | condition | false | bool | since > d() | | logical | bool | and,or | 12..12 | true | ||
| 62 | condition | false | bool | age > 1 an| | logical | bool | and,or | 8..10 | true | ||
| 63 | condition | false | bool | age > 1 and| | logical | bool | and,or | 8..11 | true | ||
| 64 | condition | false | bool | age > 1 and age | | operator | ==,!=,<,<=,>,>=,in,not in | 16..16 | true | |||
| 65 | # Logical connectives, not, ternary, coalesce, arithmetic | ||||||||||
| 66 | condition | false | bool | age > 1 and | | start | bool | 12..12 | true | |||
| 67 | condition | false | bool | age > 1 or | | start | bool | 11..11 | true | |||
| 68 | condition | false | bool | ((age > 1) and | | start | bool | 15..15 | true | |||
| 69 | condition | false | bool | age > 1 and (| | start | bool | 13..13 | true | |||
| 70 | condition | false | bool | not | | start | bool | 4..4 | true | |||
| 71 | value | false | status | age > 18 ? | | value | status | open=Open case,closed=Closed | 11..11 | true | ||
| 72 | value | false | number | amount ?? | | value | number | 10..10 | true | |||
| 73 | value | false | number | age + | | start | number | 6..6 | true | |||
| 74 | value | false | number | { a: | | start | 5..5 | true | ||||
| 75 | value | false | string | `Hello ${| | start | 9..9 | true | ||||
| 76 | # Member access | ||||||||||
| 77 | condition | false | bool | customer.| | member | 9..9 | false | ||||
| 78 | condition | false | bool | customer.na| | member | 9..11 | false | ||||
| 79 | condition | false | bool | d().| | member | 4..4 | false | ||||
| 80 | condition | false | bool | some(items, #.| | member | 14..14 | false | ||||
| 81 | # Function arguments and closures | ||||||||||
| 82 | condition | false | bool | d(| | argument | date | 2..2 | true | |||
| 83 | condition | false | bool | len(| | argument | any | 4..4 | true | |||
| 84 | condition | false | bool | contains(name, | | argument | any | 15..15 | true | |||
| 85 | condition | false | bool | startsWith(name, | | argument | string | 17..17 | true | |||
| 86 | condition | false | bool | since.isAfter(| | argument | date | 14..14 | true | |||
| 87 | condition | false | bool | since.diff(d(), | | argument | DurationUnit | seconds,second,secs,sec,s,minutes,minute,min,mins,m,hours,hour,hr,hrs,h,days,day,d,weeks,week,w,months,month,mo,M,quarters,quarter,qtr,q,years,year,y | 16..16 | true | ||
| 88 | condition | false | bool | some(| | argument | any[] | 5..5 | true | |||
| 89 | condition | false | bool | some(items, | | closure | object | 12..12 | true | |||
| 90 | condition | false | bool | filter(items, | | closure | object | 14..14 | true | |||
| 91 | condition | false | bool | some(statuses, | | closure | status | open=Open case,closed=Closed | 15..15 | true | ||
| 92 | condition | false | bool | some(items, #.status == | | value | status | open=Open case,closed=Closed | 24..24 | true | ||
| 93 | condition | false | bool | some(statuses, # == | | value | status | open=Open case,closed=Closed | 20..20 | true | ||
| 94 | condition | false | bool | some(items, #.price > 1 | | logical | bool | and,or | 24..24 | true | ||
| 95 | condition | false | bool | some(items, #.price | | operator | ==,!=,<,<=,>,>=,in,not in | 20..20 | true | |||
| 96 | condition | false | bool | some(items, #.price > 1 and | | closure | object | 28..28 | true | |||
| 97 | condition | false | bool | some(items, (#.price > 1 and | | closure | object | 29..29 | true | |||
| 98 | condition | false | bool | some(items as x, | | closure | object | 17..17 | true | |||
| 99 | condition | false | bool | some(items as x, x| | closure | object | 17..18 | false | |||
| 100 | condition | false | bool | some(statuses as s, | | closure | status | open=Open case,closed=Closed | 20..20 | true | ||
| 101 | condition | false | bool | some(statuses as s, s == | | value | status | open=Open case,closed=Closed | 25..25 | true | ||
| 102 | condition | false | bool | some(items as x, some(statuses as s, | | closure | status | open=Open case,closed=Closed | 37..37 | true | ||
| 103 | condition | false | bool | len(name | | operator | ==,!=,in,not in | 9..9 | true | |||
| 104 | condition | false | bool | len(age | | operator | ==,!=,<,<=,>,>=,in,not in | 8..8 | true | |||
| 105 | # Unary cells | ||||||||||
| 106 | unary | true | $status | | | unaryStart | status | open=Open case,closed=Closed | !=,in,not in | 0..0 | true | |
| 107 | unary | true | $status | != | | value | status | open=Open case,closed=Closed | 3..3 | true | ||
| 108 | unary | true | $status | [| | listElement | status | open=Open case,closed=Closed | 1..1 | true | ||
| 109 | unary | true | $status | not in [| | listElement | status | open=Open case,closed=Closed | 8..8 | true | ||
| 110 | unary | true | $status | $ | | operator | ==,!=,in,not in | 2..2 | true | |||
| 111 | unary | true | $status | $ == | | value | status | open=Open case,closed=Closed | 5..5 | true | ||
| 112 | unary | true | $number | | | unaryStart | number | >,>=,<,<=,==,!=,in,not in | 0..0 | true | ||
| 113 | unary | true | $number | > | | value | number | 2..2 | true | |||
| 114 | unary | true | $number | > 5 | | logical | bool | and,or | 4..4 | true | ||
| 115 | unary | true | $number | 5, | | unaryStart | number | >,>=,<,<=,==,!=,in,not in | 3..3 | true | ||
| 116 | unary | true | $number | -5 | | logical | bool | and,or | 3..3 | true | ||
| 117 | unary | true | $number | [1..| | range | number | 4..4 | false | |||
| 118 | unary | true | $number | [1..5] | | logical | bool | and,or | 7..7 | true | ||
| 119 | unary | true | $number | (1..5) or | | unaryStart | number | >,>=,<,<=,==,!=,in,not in | 10..10 | true | ||
| 120 | unary | true | $string | len($) | | operator | ==,!=,<,<=,>,>=,in,not in | 7..7 | true | |||
| 121 | unary | true | $date | | | unaryStart | date | >,>=,<,<=,==,!=,in,not in | 0..0 | true | ||
| 122 | unary | true | $date | > d(| | argument | date | 4..4 | true | |||
| 123 | unary | true | $date | [d()..| | range | date | 6..6 | false | |||
| 124 | unary | true | $date | > d() | | logical | bool | and,or | 6..6 | true | ||
| 125 | unary | true | $bool | | | unaryStart | bool | ==,!= | 0..0 | true | ||
| 126 | unary | true | $bool | == | | value | bool | 3..3 | true | |||
| 127 | unary | true | $any | | | unaryStart | any | >,>=,<,<=,==,!=,in,not in | 0..0 | true | ||
| 128 | # Path replace span covers only the last segment | ||||||||||
| 129 | path | false | grounding.stat| | path | 10..14 | false | |||||
| 130 | path | false | grounding.| | path | 10..10 | false | |||||
| 131 | path | false | grou| | path | 0..4 | false | |||||
| 132 | # Path role and lexer fallback | ||||||||||
| 133 | path | false | | | path | 0..0 | true | |||||
| 134 | path | false | customer.na| | path | 9..11 | false | |||||
| 135 | path | false | customer.na|me | path | 9..13 | false | |||||
| 136 | # Adversarial: unary cells | ||||||||||
| 137 | unary | true | $number | >= 5 and < | | value | number | 11..11 | true | |||
| 138 | unary | true | $number | $ > 5 and $ < | | value | number | 14..14 | true | |||
| 139 | unary | true | $number | >| | operator | >,>= | 0..1 | true | |||
| 140 | unary | true | $number | > | | value | number | 4..4 | true | |||
| 141 | unary | true | $number | > 5 and| | logical | bool | and,or | 4..7 | true | ||
| 142 | unary | true | $number | > 5 |) | logical | bool | and,or | 4..4 | true | ||
| 143 | unary | true | $number | 5| | unaryStart | number | >,>=,<,<=,==,!=,in,not in | 0..1 | true | ||
| 144 | unary | true | $number | (| | range | number | 1..1 | false | |||
| 145 | unary | true | $number | [1..5], (| | range | number | 9..9 | false | |||
| 146 | unary | true | $number | 1_000, | | unaryStart | number | >,>=,<,<=,==,!=,in,not in | 7..7 | true | ||
| 147 | unary | true | $status | not | | start | bool | 4..4 | true | |||
| 148 | unary | true | $status | == | | value | status | open=Open case,closed=Closed | 3..3 | true | ||
| 149 | unary | true | $string | len($) > | | value | number | 9..9 | true | |||
| 150 | unary | true | $date | > d().| | member | date | 6..6 | false | |||
| 151 | unary | true | $bool | true | | logical | bool | and,or | 5..5 | true | ||
| 152 | unary | true | $bool | tr| | unaryStart | bool | ==,!= | 0..2 | true | ||
| 153 | unary | true | $any | > | | value | any | 2..2 | true | |||
| 154 | unary | true | $number | > 5 and < 10 or | | unaryStart | number | >,>=,<,<=,==,!=,in,not in | 16..16 | true | ||
| 155 | # Adversarial: standard conditions | ||||||||||
| 156 | condition | false | bool | not (customer.age > 18 and | | start | bool | 27..27 | true | |||
| 157 | condition | false | bool | len(items) > | | value | number | 13..13 | true | |||
| 158 | condition | false | bool | age not in (| | range | number | 12..12 | false | |||
| 159 | condition | false | bool | age in (| | range | number | 8..8 | false | |||
| 160 | condition | false | bool | age not in [| | listElement | number | 12..12 | true | |||
| 161 | value | false | string | `hello ${customer.| | member | 18..18 | false | ||||
| 162 | condition | false | bool | customer.age == -| | value | number | 17..17 | true | |||
| 163 | condition | false | bool | 1_000 > | | value | number | 8..8 | true | |||
| 164 | condition | false | bool | customer.address.| | member | 17..17 | false | ||||
| 165 | condition | false | bool | orders[0].| | member | 10..10 | false | ||||
| 166 | condition | false | bool | (age > 1) == | | value | bool | 13..13 | true | |||
| 167 | condition | false | bool | (name).| | member | 7..7 | false | ||||
| 168 | condition | false | bool | statuses[1:| | start | number | 11..11 | true | |||
| 169 | condition | false | bool | sum(items, #.| | member | 13..13 | false | ||||
| 170 | condition | false | bool | map(items, #.price) | | operator | in,not in | 20..20 | true | |||
| 171 | condition | false | bool | name == `| | inString | string | 8..9 | true | |||
| 172 | condition | false | bool | name == `a ${age}` | | logical | bool | and,or | 19..19 | true | ||
| 173 | # Adversarial: output values | ||||||||||
| 174 | value | false | number | amount ?? | | value | number | 10..10 | true | |||
| 175 | value | false | number | age > 18 ? 1 : | | value | number | 15..15 | true | |||
| 176 | value | false | number | (| | start | number | 1..1 | true | |||
| 177 | condition | false | bool | customer.| == 5 | member | 9..9 | false | ||||
| 178 | condition | false | bool | age |> 5 | operator | ==,!=,<,<=,>,>=,in,not in | 4..4 | true | |||
| 179 | condition | false | bool | age > 5 |and active | logical | bool | and,or | 8..8 | true | ||
| 180 | condition | false | bool | age > | and active | value | number | 6..6 | true | |||
| 181 | condition | false | bool | age > |5 and active | value | number | 6..6 | true | |||
| 182 | condition | false | bool | |age > 5 | start | bool | 0..0 | true | |||
| 183 | # Adversarial: nasty input | ||||||||||
| 184 | condition | false | bool | age > 1))) | | logical | bool | and,or | 11..11 | true | ||
| 185 | condition | false | bool | == | | value | 3..3 | true | ||||
| 186 | condition | false | bool | status == 'op| | inString | status | open=Open case | 10..13 | true | ||
| 187 | condition | false | bool | inbound > | | value | number | 10..10 | true | |||
| 188 | condition | false | bool | nothing | | logical | bool | and,or,==,!= | 8..8 | true | ||
| 189 | condition | false | bool | true_value == | | value | number | 14..14 | true | |||
| 190 | condition | false | bool | in_progress | | logical | bool | and,or,==,!= | 12..12 | true | ||
| 191 | condition | false | bool | customer.in| | member | 9..11 | false | ||||
| 192 | condition | false | bool | in| | start | bool | 0..2 | false | |||
| 193 | condition | false | bool | not| | start | bool | 0..3 | false | |||
| 194 | condition | false | bool | age > 1 and or | | start | bool | 15..15 | true | |||
| 195 | condition | false | bool | age > 1 and $root.| | member | 18..18 | false | ||||
| 196 | # Adversarial: second batch | ||||||||||
| 197 | unary | true | $status | $ in [| | listElement | status | open=Open case,closed=Closed | 6..6 | true | ||
| 198 | unary | true | $number | >= 5 and <= | | value | number | 12..12 | true | |||
| 199 | unary | true | $number | > 5 or (| | range | number | 8..8 | false | |||
| 200 | unary | true | $number | ($ > 5 and | | start | bool | 11..11 | true | |||
| 201 | unary | true | $number | ($ > 5 and $ < 10) or | | unaryStart | number | >,>=,<,<=,==,!=,in,not in | 22..22 | true | ||
| 202 | unary | true | $number | [1..5], [| | listElement | number | 9..9 | true | |||
| 203 | unary | true | $number | [1, 2, | | listElement | number | 7..7 | true | |||
| 204 | unary | true | $number | in [1, | | listElement | number | 7..7 | true | |||
| 205 | unary | true | $number | not in [1..| | range | number | 11..11 | false | |||
| 206 | unary | true | $number | -| | value | number | 1..1 | true | |||
| 207 | unary | true | $number | - | | value | number | 2..2 | true | |||
| 208 | unary | true | $number | 5 | | logical | bool | and,or | 2..2 | true | ||
| 209 | unary | true | $number | 5, 6 | | logical | bool | and,or | 5..5 | true | ||
| 210 | unary | true | $number | 5 - | | start | number | 4..4 | true | |||
| 211 | unary | true | $number | > 5 an| | logical | bool | and,or | 4..6 | true | ||
| 212 | unary | true | $number | > 5 andrew| | logical | bool | and,or | 4..10 | true | ||
| 213 | unary | true | $number | len(| | argument | any | 4..4 | true | |||
| 214 | unary | true | $number | abs($) > | | value | number | 9..9 | true | |||
| 215 | unary | true | $number | true | | logical | bool | and,or | 5..5 | true | ||
| 216 | unary | true | $string | $ == upper(| | argument | string | 11..11 | true | |||
| 217 | unary | true | $string | len($) in [| | listElement | number | 11..11 | true | |||
| 218 | unary | true | $date | $.isAfter(| | argument | date | 10..10 | true | |||
| 219 | unary | true | $date | $.isAfter(d(| | argument | date | 12..12 | true | |||
| 220 | unary | true | $bool | == tr| | value | bool | 3..5 | true | |||
| 221 | unary | true | $bool | true or | | unaryStart | bool | ==,!= | 8..8 | true | ||
| 222 | unary | true | $bool | not | | start | bool | 4..4 | true | |||
| 223 | unary | true | $any | $.| | member | 2..2 | false | ||||
| 224 | # Adversarial: standard conditions, second batch | ||||||||||
| 225 | condition | false | bool | some(statuses, # in [| | listElement | status | open=Open case,closed=Closed | 21..21 | true | ||
| 226 | condition | false | bool | some(statuses, # not in [| | listElement | status | open=Open case,closed=Closed | 25..25 | true | ||
| 227 | condition | false | bool | some(items, #.status in [| | listElement | status | open=Open case,closed=Closed | 25..25 | true | ||
| 228 | condition | false | bool | all(items, #.price > | | value | number | 21..21 | true | |||
| 229 | condition | false | bool | none(items, #.price in [1..| | range | number | 27..27 | false | |||
| 230 | condition | false | bool | filter(items, #.price > 1)[0].| | member | 30..30 | false | ||||
| 231 | condition | false | bool | len(filter(items, #.price > 1)) > | | value | number | 34..34 | true | |||
| 232 | condition | false | bool | since.isSame(| | argument | date | 13..13 | true | |||
| 233 | condition | false | bool | since.year() == | | value | number | 16..16 | true | |||
| 234 | condition | false | bool | since.year() | | operator | ==,!=,<,<=,>,>=,in,not in | 13..13 | true | |||
| 235 | condition | false | bool | d(since).| | member | 9..9 | false | ||||
| 236 | condition | false | bool | age + 1 > | | value | number | 10..10 | true | |||
| 237 | condition | false | bool | age * 2 | | operator | ==,!=,<,<=,>,>=,in,not in | 8..8 | true | |||
| 238 | condition | false | bool | age > age * | | start | number | 12..12 | true | |||
| 239 | condition | false | bool | number(name) > | | value | number | 15..15 | true | |||
| 240 | condition | false | bool | age in [18, | | listElement | number | 12..12 | true | |||
| 241 | condition | false | bool | age in [18, 21] | | logical | bool | and,or | 16..16 | true | ||
| 242 | condition | false | bool | age in [18..| | range | number | 12..12 | false | |||
| 243 | condition | false | bool | age in (18..| | range | number | 12..12 | false | |||
| 244 | condition | false | bool | age not in [1..5] and | | start | bool | 22..22 | true | |||
| 245 | condition | false | bool | not active and | | start | bool | 15..15 | true | |||
| 246 | condition | false | bool | not (active) | | logical | bool | and,or | 13..13 | true | ||
| 247 | condition | false | bool | active == true and | | start | bool | 19..19 | true | |||
| 248 | condition | false | bool | active == | | value | bool | 10..10 | true | |||
| 249 | condition | false | bool | amount > | | value | number? | 9..9 | true | |||
| 250 | condition | false | bool | amount ?? 0 > | | value | number | 14..14 | true | |||
| 251 | condition | false | bool | (amount ?? 0) > | | value | number | 16..16 | true | |||
| 252 | condition | false | bool | $root.customer.status in [| | listElement | status | open=Open case,closed=Closed | 26..26 | true | ||
| 253 | condition | false | bool | age == 1 + | | start | number | 11..11 | true | |||
| 254 | condition | false | bool | age == (| | start | number | 8..8 | true | |||
| 255 | condition | false | bool | age == -(| | start | number | 9..9 | true | |||
| 256 | condition | false | bool | `${| | start | 3..3 | true | ||||
| 257 | condition | false | bool | `${age} | | inString | bool | 0..8 | false | |||
| 258 | # Adversarial: output values, second batch | ||||||||||
| 259 | value | false | status | `| | inString | status | open=Open case,closed=Closed | 0..1 | true | ||
| 260 | value | false | status | customer.status ?? | | value | status | open=Open case,closed=Closed | 19..19 | true | ||
| 261 | value | false | status | customer.| | member | status | 9..9 | false | |||
| 262 | value | false | status | customer.status | | operator | ==,!=,in,not in | 16..16 | true | |||
| 263 | value | false | status | upper(| | argument | string | 6..6 | true | |||
| 264 | value | false | bool | age > 18 ? | | value | bool | 11..11 | true | |||
| 265 | value | false | bool | age > 18 | | logical | bool | and,or | 9..9 | true | ||
| 266 | value | false | bool | age > | | value | number | 6..6 | true | |||
| 267 | value | false | bool | age | | operator | ==,!=,<,<=,>,>=,in,not in | 4..4 | true | |||
| 268 | value | false | bool | active and | | start | bool | 11..11 | true | |||
| 269 | value | false | number | age > 18 ? 1 : (| | start | number | 16..16 | true | |||
| 270 | value | false | number | -| | value | number | 1..1 | true | |||
| 271 | value | false | number | 1_000 + | | start | number | 8..8 | true | |||
| 272 | value | false | number | sum(map(items, #.| | member | 17..17 | false | ||||
| 273 | value | false | number | sum(map(items, #.price)) + | | start | number | 27..27 | true | |||
| 274 | value | false | number | round(amount ?? 0, | | argument | number | 19..19 | true | |||
| 275 | value | false | number | len(| | argument | any | 4..4 | true | |||
| 276 | value | false | number | age ?? | | value | number | 7..7 | true | |||
| 277 | value | false | date | d().add(| | argument | any | 8..8 | true | |||
| 278 | value | false | date | active ? since : | | value | date | 17..17 | true | |||
| 279 | value | false | date | since ?? | | value | date | 9..9 | true | |||
| 280 | value | false | string | `Hello ${name}, you are ${| | start | 26..26 | true | ||||
| 281 | # Adversarial: caret mid-text, second batch | ||||||||||
| 282 | condition | false | bool | d(|) > since | argument | date | 2..2 | true | |||
| 283 | condition | false | bool | some(items, |#.price > 1) | closure | object | 12..12 | true | |||
| 284 | condition | false | bool | some(items, #.price > |1) | value | number | 22..22 | true | |||
| 285 | condition | false | bool | age in [1..|5] | range | number | 11..11 | false | |||
| 286 | condition | false | bool | age in [|1..5] | range | number | 8..8 | false | |||
| 287 | unary | true | $number | > 5 and |< 10 | unaryStart | number | >,>=,<,<=,==,!=,in,not in | 8..8 | true | ||
| 288 | unary | true | $number | >| 5 | operator | >,>= | 0..1 | true | |||
| 289 | # Adversarial: nasty input, second batch | ||||||||||
| 290 | condition | false | bool | )| | start | bool | 1..1 | true | |||
| 291 | condition | false | bool | age > 1) and | | start | bool | 13..13 | true | |||
| 292 | condition | false | bool | ((age > 1 | | logical | bool | and,or | 10..10 | true | ||
| 293 | condition | false | bool | age > > | | value | 8..8 | true | ||||
| 294 | condition | false | bool | and | | start | bool | 4..4 | true | |||
| 295 | condition | false | bool | , | | start | 2..2 | true | ||||
| 296 | condition | false | bool | inbound | | operator | ==,!=,<,<=,>,>=,in,not in | 8..8 | true | |||
| 297 | condition | false | bool | inbound in [| | listElement | number | 12..12 | true | |||
| 298 | condition | false | bool | andrew | | operator | ==,!=,in,not in | 7..7 | true | |||
| 299 | condition | false | bool | nothing == | | value | bool | 11..11 | true | |||
| 300 | condition | false | bool | true_value | | operator | ==,!=,<,<=,>,>=,in,not in | 11..11 | true | |||
| 301 | condition | false | bool | in_progress == | | value | bool | 15..15 | true | |||
| 302 | condition | false | bool | customer.in_progress | | operator | ==,!=,<,<=,>,>=,in,not in | 21..21 | true | |||
| 303 | condition | false | bool | notin | | operator | ==,!=,<,<=,>,>=,in,not in | 6..6 | true | |||
| 304 | condition | false | bool | age not in| | operator | ==,!=,<,<=,>,>=,in,not in | 4..10 | true | |||
| 305 | condition | false | bool | age not | | start | bool | 8..8 | true | |||
| 306 | condition | false | bool | age in| | operator | ==,!=,<,<=,>,>=,in,not in | 4..6 | true | |||
| 307 | condition | false | bool | age i| | operator | ==,!=,<,<=,>,>=,in,not in | 4..5 | true | |||
| 308 | condition | false | bool | age >= 18 and status i| | operator | ==,!=,in,not in | 21..22 | true | |||
| 309 | condition | false | bool | null == | | value | null | 8..8 | true | |||
| 310 | condition | false | bool | status == null | | logical | bool | and,or | 15..15 | true | ||
| 311 | condition | false | bool | status == |null | value | status | open=Open case,closed=Closed | 10..10 | true | ||
| 312 | condition | false | bool | age > 1 and (|) | start | bool | 13..13 | true | |||
| 313 | # Adversarial: third batch | ||||||||||
| 314 | unary | true | $status | | | unaryStart | status | open=Open case,closed=Closed | !=,in,not in | 3..3 | true | |
| 315 | unary | true | $status | customer.| | member | status | 9..9 | false | |||
| 316 | unary | true | $number | < | | value | number | 2..2 | true | |||
| 317 | unary | true | $number | != | | value | number | 3..3 | true | |||
| 318 | unary | true | $number | 1.| | unaryStart | number | >,>=,<,<=,==,!=,in,not in | 0..2 | true | ||
| 319 | unary | true | $number | > 1.5 | | logical | bool | and,or | 6..6 | true | ||
| 320 | unary | true | $number | > len(| | argument | any | 6..6 | true | |||
| 321 | unary | true | $number | > customer.| | member | number | 11..11 | false | |||
| 322 | unary | true | $number | == customer.age | | logical | bool | and,or | 16..16 | true | ||
| 323 | unary | true | $number | [1..5] or [| | listElement | number | 11..11 | true | |||
| 324 | unary | true | $number | [1, 2] or (| | range | number | 11..11 | false | |||
| 325 | unary | true | $number | > 5 and < 10 and | | unaryStart | number | >,>=,<,<=,==,!=,in,not in | 17..17 | true | ||
| 326 | unary | true | $number | [1..5]| | logical | bool | and,or | 6..6 | false | ||
| 327 | unary | true | $date | == d(| | argument | date | 5..5 | true | |||
| 328 | unary | true | $date | d(| | argument | date | 2..2 | true | |||
| 329 | unary | true | $bool | false | | logical | bool | and,or | 6..6 | true | ||
| 330 | unary | true | $bool | != | | value | bool | 3..3 | true | |||
| 331 | unary | true | $any | == | | value | any | 3..3 | true | |||
| 332 | condition | false | bool | age > 1.| | value | number | 6..8 | true | |||
| 333 | condition | false | bool | tags[0] | | operator | ==,!=,in,not in | 8..8 | true | |||
| 334 | condition | false | bool | items[0].| | member | 9..9 | false | ||||
| 335 | condition | false | bool | items[-1].| | member | 10..10 | false | ||||
| 336 | condition | false | bool | items[0].price > | | value | number | 17..17 | true | |||
| 337 | condition | false | bool | abs(age - 18) < | | value | number | 16..16 | true | |||
| 338 | condition | false | bool | customer.address.city | | operator | ==,!=,in,not in | 22..22 | true | |||
| 339 | condition | false | bool | tr| | start | bool | 0..2 | false | |||
| 340 | condition | false | bool | true| | start | bool | 0..4 | false | |||
| 341 | condition | false | bool | true | | logical | bool | and,or | 5..5 | true | ||
| 342 | condition | false | bool | null| | start | bool | 0..4 | false | |||
| 343 | condition | false | bool | age == null| | value | number | 7..11 | true | |||
| 344 | condition | false | bool | age in [1..5]| | logical | bool | and,or | 13..13 | false | ||
| 345 | condition | false | bool | age in [1..5] and age not in (| | range | number | 30..30 | false | |||
| 346 | condition | false | bool | age > | garbage here | value | number | 6..6 | true | |||
| 347 | condition | false | bool | (((| | start | bool | 3..3 | true | |||
| 348 | condition | false | bool | age <> | | value | 7..7 | true | ||||
| 349 | condition | false | bool | age > 1 && | | start | bool | 11..11 | true | |||
| 350 | condition | false | bool | status == “| | start | bool | 13..13 | true | |||
| 351 | value | false | number | age > 18 ? age : | | value | number | 17..17 | true | |||
| 352 | value | false | bool | not | | start | bool | 4..4 | true | |||
| 353 | value | false | number | sum(map(items, #.price)) | | operator | ==,!=,<,<=,>,>=,in,not in | 25..25 | true | |||
| 354 | value | false | number | max(| | argument | any[] | 4..4 | true | |||
| 355 | path | false | customer.address.| | path | 17..17 | false | |||||
| 356 | path | false | cust| | path | 0..4 | false | |||||
| 357 | path | false | |customer | path | 0..8 | false | |||||
| 358 | path | false | in| | path | 0..2 | false | |||||
| 359 | path | false | customer.|address | path | 9..16 | false | |||||
| 360 | # Path role: only a bare identifier chain is a path, anything else classifies as a value expression | ||||||||||
| 361 | path | false | d(| | argument | date | 2..2 | true | ||||
| 362 | path | false | customer.since.| | path | 15..15 | false | |||||
| 363 | path | false | customer.since.isAfter(| | argument | date | 23..23 | true | ||||
| 364 | path | false | customer.name | | operator | ==,!=,in,not in | 14..14 | true | ||||
| 365 | path | false | len(| | argument | any | 4..4 | true | ||||
| 366 | path | false | customer.age + | | start | number | 15..15 | true | ||||
| 367 | # Closure membership: the collection literal takes the enum of the field it is tested against | ||||||||||
| 368 | condition | false | bool | some([|], # in statuses) | listElement | status | open=Open case,closed=Closed | 6..6 | true | ||
| 369 | condition | false | bool | some([|] as s, s in statuses) | listElement | status | open=Open case,closed=Closed | 6..6 | true | ||
| 370 | condition | false | bool | some([|], # in tags) | listElement | 6..6 | true | ||||
| 371 | # Auto-open: an operand due (empty editor or after something) opens the menu | a word under the caret or a member/path prefix does not | |||||||||
| 372 | condition | false | bool | active and | | start | bool | 11..11 | true | |||
| 373 | condition | false | bool | a > 1 or | | start | bool | 9..9 | true | |||
| 374 | value | false | number | age + | | start | number | 6..6 | true | |||
| 375 | condition | false | bool | age > | | value | number | 6..6 | true | |||
| 376 | condition | false | bool | len(| | argument | any | 4..4 | true | |||
| 377 | value | false | number | x ? | | value | number | 4..4 | true | |||
| 378 | value | false | number | x ?? | | value | any | 5..5 | true | |||
| 379 | value | false | [| | listElement | 1..1 | true | |||||
| 380 | condition | false | bool | (| | start | bool | 1..1 | true | |||
| 381 | condition | false | bool | | | start | bool | 0..0 | true | |||
| 382 | condition | false | bool | cust| | start | bool | 0..4 | false | |||
| 383 | condition | false | bool | customer.| | member | 9..9 | false | ||||
| 384 | path | false | | | path | 0..0 | true | |||||
| 385 | path | false | | | path | 1..1 | true | |||||
| 386 | path | false | cust| | path | 0..4 | false | |||||
| 387 | path | false | customer.| | path | 9..9 | false | |||||
| 388 | # Const-typed fields offer their literal like a one-member enum | a bare literal on the left still widens | |||||||||
| 389 | # Nullable operands: inner operators plus ==, != and ?? | equality values offer null | |||||||||
| 390 | condition | false | bool | amount > | | value | number? | 9..9 | true | |||
| 391 | condition | false | bool | amount == | | value | number? | null | 10..10 | true | ||
| 392 | unary | true | $number | <| | operator | <,<= | 0..1 | true | |||
| 393 | unary | true | $number | >=| | value | number | 2..2 | true | |||
| 394 | condition | false | bool | age >| | operator | >,>= | 4..5 | true | |||
| 395 | condition | false | bool | age ==| | value | number | 6..6 | true | |||
| 396 | unary | true | $number | =| | operator | == | 0..1 | true | |||
| 397 | unary | true | $number | !| | operator | != | 0..1 | true | |||
| 398 | condition | false | bool | claim.amount =| | operator | == | 13..14 | true | |||
| 399 | condition | false | bool | name !| | operator | != | 5..6 | true | |||
| 400 | # Glued operator prefixes: the typed operator stays replaceable while longer ones begin with it | ||||||||||
| 401 | condition | false | bool | age > 1 ?| | start | bool | 9..9 | true | |||
| 402 | unary | true | $number | >= 1 and >| | operator | >,>= | 9..10 | true | |||
| 403 | unary | true | $number | >= 1 and >| 2 | operator | >,>= | 9..10 | true | |||
| 404 | unary | true | $string | >| | value | string | 1..1 | true | |||
| 405 | unary | true | $bool | =| | operator | == | 0..1 | true | |||
| 406 | unary | true | $bool | !| | operator | != | 0..1 | true | |||
| 407 | condition | false | bool | age <| | operator | <,<= | 4..5 | true | |||
| 408 | condition | false | bool | age <=| | value | number | 6..6 | true | |||
| 409 | condition | false | bool | age ==| | value | number | 6..6 | true | |||
| 410 | condition | false | bool | age !=| | value | number | 6..6 | true | |||
| 411 | condition | false | bool | age >| | operator | >,>= | 4..5 | true | |||
| 412 | condition | false | bool | age >=| | value | number | 6..6 | true | |||
| 413 | unary | true | $status | =| | operator | == | 0..1 | true | |||
| 414 | unary | true | $string | =| | operator | == | 0..1 | true | |||
| 415 | # Bare bool fields also compare | literals, calls, groups and negations only connect |