(op, exprOption, getters)
| 90937 | } |
| 90938 | |
| 90939 | function parseAndOrOption(op, exprOption, getters) { |
| 90940 | var subOptionArr = exprOption[op]; |
| 90941 | var errMsg = ''; |
| 90942 | |
| 90943 | if ("development" !== 'production') { |
| 90944 | errMsg = makePrintable('"and"/"or" condition should only be `' + op + ': [...]` and must not be empty array.', 'Illegal condition:', exprOption); |
| 90945 | } |
| 90946 | |
| 90947 | if (!isArray(subOptionArr)) { |
| 90948 | throwError(errMsg); |
| 90949 | } |
| 90950 | |
| 90951 | if (!subOptionArr.length) { |
| 90952 | throwError(errMsg); |
| 90953 | } |
| 90954 | |
| 90955 | var cond = op === 'and' ? new AndConditionInternal() : new OrConditionInternal(); |
| 90956 | cond.children = map(subOptionArr, function (subOption) { |
| 90957 | return parseOption(subOption, getters); |
| 90958 | }); |
| 90959 | |
| 90960 | if (!cond.children.length) { |
| 90961 | throwError(errMsg); |
| 90962 | } |
| 90963 | |
| 90964 | return cond; |
| 90965 | } |
| 90966 | |
| 90967 | function parseNotOption(exprOption, getters) { |
| 90968 | var subOption = exprOption.not; |
no test coverage detected
searching dependent graphs…