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