| Index: third_party/pkg/angular/lib/core/parser/utils.dart
|
| ===================================================================
|
| --- third_party/pkg/angular/lib/core/parser/utils.dart (revision 33054)
|
| +++ third_party/pkg/angular/lib/core/parser/utils.dart (working copy)
|
| @@ -1,8 +1,6 @@
|
| library angular.core.parser.utils;
|
|
|
| import 'package:angular/core/parser/syntax.dart' show Expression;
|
| -import 'package:angular/core/module.dart';
|
| -import 'package:angular/utils.dart' show isReservedWord;
|
| export 'package:angular/utils.dart' show relaxFnApply, relaxFnArgs, toBool;
|
|
|
| /// Marker for an uninitialized value.
|
| @@ -20,14 +18,14 @@
|
| }
|
|
|
| /// Evaluate the [list] in context of the [scope].
|
| -List evalList(scope, List<Expression> list, [FilterMap filters]) {
|
| +List evalList(scope, List<Expression> list) {
|
| int length = list.length;
|
| - for (int cacheLength = _evalListCache.length; cacheLength <= length; cacheLength++) {
|
| + for(int cacheLength = _evalListCache.length; cacheLength <= length; cacheLength++) {
|
| _evalListCache.add(new List(cacheLength));
|
| }
|
| List result = _evalListCache[length];
|
| for (int i = 0; i < length; i++) {
|
| - result[i] = list[i].eval(scope, filters);
|
| + result[i] = list[i].eval(scope);
|
| }
|
| return result;
|
| }
|
| @@ -79,9 +77,8 @@
|
| return object["$key"]; // toString dangerous?
|
| } else if (object == null) {
|
| throw new EvalError('Accessing null object');
|
| - } else {
|
| - return object[key];
|
| }
|
| + throw new EvalError("Attempted field access on a non-list, non-map");
|
| }
|
|
|
| /// Set a keyed element in the given [object].
|
| @@ -93,13 +90,7 @@
|
| } else if (object is Map) {
|
| object["$key"] = value; // toString dangerous?
|
| } else {
|
| - object[key] = value;
|
| + throw new EvalError("Attempting to set a field on a non-list, non-map");
|
| }
|
| return value;
|
| }
|
| -
|
| -/// Returns a new symbol with the given name if the name is a legal
|
| -/// symbol name. Otherwise, returns null.
|
| -Symbol newSymbol(String name) {
|
| - return isReservedWord(name) ? null : new Symbol(name);
|
| -}
|
|
|