Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Unified Diff: third_party/pkg/angular/lib/core/parser/utils.dart

Issue 180843004: Revert revision 33053 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/pkg/angular/lib/core/parser/syntax.dart ('k') | third_party/pkg/angular/lib/core/registry.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
-}
« no previous file with comments | « third_party/pkg/angular/lib/core/parser/syntax.dart ('k') | third_party/pkg/angular/lib/core/registry.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698