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

Unified Diff: samples/markdown/inline_parser.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 | « samples/markdown/block_parser.dart ('k') | samples/tests/samples/lib/observable/observable_list_tests.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/markdown/inline_parser.dart
diff --git a/samples/markdown/inline_parser.dart b/samples/markdown/inline_parser.dart
index bdea4f30b0fe5eba70686bc9fe227a029804d898..3a3fbd3aa13ac3bf61139a487002798b4657f62b 100644
--- a/samples/markdown/inline_parser.dart
+++ b/samples/markdown/inline_parser.dart
@@ -103,11 +103,11 @@ class InlineParser {
writeTextRange(int start, int end) {
if (end > start) {
final text = source.substring(start, end);
- final nodes = _stack.last().children;
+ final nodes = _stack.last.children;
// If the previous node is text too, just append.
- if ((nodes.length > 0) && (nodes.last() is Text)) {
- final newNode = new Text('${nodes.last().text}$text');
+ if ((nodes.length > 0) && (nodes.last is Text)) {
+ final newNode = new Text('${nodes.last.text}$text');
nodes[nodes.length - 1] = newNode;
} else {
nodes.add(new Text(text));
@@ -116,7 +116,7 @@ class InlineParser {
}
addNode(Node node) {
- _stack.last().children.add(node);
+ _stack.last.children.add(node);
}
// TODO(rnystrom): Only need this because RegExp doesn't let you start
« no previous file with comments | « samples/markdown/block_parser.dart ('k') | samples/tests/samples/lib/observable/observable_list_tests.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698