* Compile a setter function for the expression. * * @param {String} exp * @return {Function|undefined}
(exp)
| 2946 | */ |
| 2947 | |
| 2948 | function compileSetter(exp) { |
| 2949 | var path = parsePath(exp); |
| 2950 | if (path) { |
| 2951 | return function (scope, val) { |
| 2952 | setPath(scope, path, val); |
| 2953 | }; |
| 2954 | } else { |
| 2955 | 'development' !== 'production' && warn('Invalid setter expression: ' + exp); |
| 2956 | } |
| 2957 | } |
| 2958 | |
| 2959 | /** |
| 2960 | * Parse an expression into re-written getter/setters. |
no test coverage detected