(val)
| 5611 | var expressionEndPos; |
| 5612 | |
| 5613 | function parseModel (val) { |
| 5614 | str = val; |
| 5615 | len = str.length; |
| 5616 | index$1 = expressionPos = expressionEndPos = 0; |
| 5617 | |
| 5618 | if (val.indexOf('[') < 0 || val.lastIndexOf(']') < len - 1) { |
| 5619 | return { |
| 5620 | exp: val, |
| 5621 | idx: null |
| 5622 | } |
| 5623 | } |
| 5624 | |
| 5625 | while (!eof()) { |
| 5626 | chr = next(); |
| 5627 | /* istanbul ignore if */ |
| 5628 | if (isStringStart(chr)) { |
| 5629 | parseString(chr); |
| 5630 | } else if (chr === 0x5B) { |
| 5631 | parseBracket(chr); |
| 5632 | } |
| 5633 | } |
| 5634 | |
| 5635 | return { |
| 5636 | exp: val.substring(0, expressionPos), |
| 5637 | idx: val.substring(expressionPos + 1, expressionEndPos) |
| 5638 | } |
| 5639 | } |
| 5640 | |
| 5641 | function next () { |
| 5642 | return str.charCodeAt(++index$1) |
no test coverage detected