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

Unified Diff: tools/dom/scripts/templateloader.py

Issue 23534050: Make direct calls to _nativeIndexedGetter in "get last" "get first" "get single" instead of calling… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 3 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 | « tools/dom/scripts/htmldartgenerator.py ('k') | tools/dom/templates/immutable_list_mixin.darttemplate » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/scripts/templateloader.py
===================================================================
--- tools/dom/scripts/templateloader.py (revision 27268)
+++ tools/dom/scripts/templateloader.py (working copy)
@@ -82,7 +82,7 @@
variable = words[1]
if variable in conditions:
condition_stack.append((active, seen_else))
- active = conditions[variable]
+ active = active and conditions[variable]
seen_else = False
else:
error(lineno, "Unknown $if variable '%s'" % variable)
@@ -93,7 +93,8 @@
if seen_else:
raise error(lineno, 'Double $else')
seen_else = True
- active = not active
+ (parentactive, _) = condition_stack[len(condition_stack) - 1]
+ active = not active and parentactive
elif directive == '$endif':
if not condition_stack:
« no previous file with comments | « tools/dom/scripts/htmldartgenerator.py ('k') | tools/dom/templates/immutable_list_mixin.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698