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

Unified Diff: lib/syntax.dart

Issue 17553018: Initial stream support (Closed) Base URL: https://github.com/dart-lang/fancy-syntax.git@master
Patch Set: address review comments Created 7 years, 6 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 | « lib/src/mirrors.dart ('k') | pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/syntax.dart
diff --git a/lib/syntax.dart b/lib/syntax.dart
index e055371f0e758abcd574979bce9c5b4e583c2914..0a96a1ff9eeb97f00fad87e19348f2b77606ea31 100644
--- a/lib/syntax.dart
+++ b/lib/syntax.dart
@@ -4,10 +4,12 @@
library fancy_syntax;
+import 'dart:async';
import 'dart:html';
import 'dart:collection';
import 'package:mdv_observe/mdv_observe.dart';
+import 'async.dart';
import 'eval.dart';
import 'expression.dart';
import 'parser.dart';
@@ -22,13 +24,10 @@ class FancySyntax extends CustomBindingSyntax {
_Binding getBinding(model, String path, name, node) {
if (path != null) {
- if (path.isEmpty) {
- // avoid creating an unneccesary scope for the top-level template
- return null;
- } else if (model is! Scope) {
+ var expr = new Parser(path).parse();
+ if (model is! Scope) {
model = new Scope(model: model, variables: globals);
}
- var expr = new Parser(path).parse();
return new _Binding(expr, model);
} else {
return null;
« no previous file with comments | « lib/src/mirrors.dart ('k') | pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698