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

Unified Diff: utils/template/codegen.dart

Issue 11273041: Make first and last getters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status files with co19 issue number. Created 8 years, 2 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 | « utils/pub/yaml/parser.dart ('k') | utils/template/htmltree.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/template/codegen.dart
diff --git a/utils/template/codegen.dart b/utils/template/codegen.dart
index cc8c0a1cf170bb518f6d6d250e637b1b9266480b..1fcc2f3836a07c08189af75337a7d0f9c3631b87 100644
--- a/utils/template/codegen.dart
+++ b/utils/template/codegen.dart
@@ -54,12 +54,12 @@ class CGBlock {
}
void add(String value) {
- if (_stmts.last() != null) {
- _stmts.last().add(value);
+ if (_stmts.last != null) {
+ _stmts.last.add(value);
}
}
- CGStatement get last => _stmts.length > 0 ? _stmts.last() : null;
+ CGStatement get last => _stmts.length > 0 ? _stmts.last : null;
/**
* Returns mixed list of elements marked with the var attribute. If the
@@ -522,7 +522,7 @@ class ElemCG {
_globalInits = new StringBuffer();
bool get isLastBlockConstructor {
- CGBlock block = _cgBlocks.last();
+ CGBlock block = _cgBlocks.last;
return block.isConstructor;
}
@@ -649,10 +649,10 @@ Nested #each or #with must have a localName;
}
}
- CGBlock get lastBlock => _cgBlocks.length > 0 ? _cgBlocks.last() : null;
+ CGBlock get lastBlock => _cgBlocks.length > 0 ? _cgBlocks.last : null;
void add(String str) {
- _cgBlocks.last().add(str);
+ _cgBlocks.last.add(str);
}
String get globalDeclarations {
@@ -669,7 +669,7 @@ Nested #each or #with must have a localName;
String get codeBody {
closeStatement();
- return _cgBlocks.last().codeBody;
+ return _cgBlocks.last.codeBody;
}
/* scopeName for expression
« no previous file with comments | « utils/pub/yaml/parser.dart ('k') | utils/template/htmltree.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698