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

Unified Diff: samples/markdown/inline_parser.dart

Issue 10919146: Get rid of a lot of () for getters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 | « samples/markdown/block_parser.dart ('k') | samples/sample_extension/sample_asynchronous_extension.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 ed11e5ab9e5473bc97ac36fd171e45b5512b2dfc..053276bcbf08f387c2e7d69755142e652d9044a0 100644
--- a/samples/markdown/inline_parser.dart
+++ b/samples/markdown/inline_parser.dart
@@ -5,7 +5,7 @@
/// Maintains the internal state needed to parse inline span elements in
/// markdown.
class InlineParser {
- static List<InlineSyntax> get syntaxes() {
+ static List<InlineSyntax> get syntaxes {
// Lazy initialize.
if (_syntaxes == null) {
_syntaxes = <InlineSyntax>[
@@ -121,9 +121,9 @@ class InlineParser {
// TODO(rnystrom): Only need this because RegExp doesn't let you start
// searching from a given offset.
- String get currentSource() => source.substring(pos, source.length);
+ String get currentSource => source.substring(pos, source.length);
- bool get isDone() => pos == source.length;
+ bool get isDone => pos == source.length;
void advanceBy(int length) {
pos += length;
@@ -227,7 +227,7 @@ class LinkSyntax extends TagSyntax {
/// The regex for the end of a link needs to handle both reference style and
/// inline styles as well as optional titles for inline links. To make that
/// a bit more palatable, this breaks it into pieces.
- static get linkPattern() {
+ static get linkPattern {
final refLink = @'\s?\[([^\]]*)\]'; // "[id]" reflink id.
final title = @'(?:[ ]*"([^"]+)"|)'; // Optional title in quotes.
final inlineLink = '\\s?\\(([^ )]+)$title\\)'; // "(url "title")" link.
« no previous file with comments | « samples/markdown/block_parser.dart ('k') | samples/sample_extension/sample_asynchronous_extension.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698