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

Side by Side Diff: pkg/analyzer/lib/src/generated/scanner.dart

Issue 1265453005: Code clean-up, mostly constructors (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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 unified diff | Download patch
« no previous file with comments | « pkg/analyzer/lib/src/generated/resolver.dart ('k') | pkg/analyzer/lib/src/generated/sdk.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library engine.scanner; 5 library engine.scanner;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'error.dart'; 9 import 'error.dart';
10 import 'java_engine.dart'; 10 import 'java_engine.dart';
(...skipping 1992 matching lines...) Expand 10 before | Expand all | Expand 10 after
2003 Token previous; 2003 Token previous;
2004 2004
2005 /** 2005 /**
2006 * The next token in the token stream. 2006 * The next token in the token stream.
2007 */ 2007 */
2008 Token _next; 2008 Token _next;
2009 2009
2010 /** 2010 /**
2011 * Initialize a newly created token to have the given [type] and [offset]. 2011 * Initialize a newly created token to have the given [type] and [offset].
2012 */ 2012 */
2013 Token(this.type, int offset) { 2013 Token(this.type, this.offset);
2014 this.offset = offset;
2015 }
2016 2014
2017 /** 2015 /**
2018 * Return the offset from the beginning of the file to the character after the 2016 * Return the offset from the beginning of the file to the character after the
2019 * last character of the token. 2017 * last character of the token.
2020 */ 2018 */
2021 int get end => offset + length; 2019 int get end => offset + length;
2022 2020
2023 /** 2021 /**
2024 * Return `true` if this token represents an operator. 2022 * Return `true` if this token represents an operator.
2025 */ 2023 */
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after
2664 CommentToken get precedingComments => _precedingComment; 2662 CommentToken get precedingComments => _precedingComment;
2665 2663
2666 void set precedingComments(CommentToken comment) { 2664 void set precedingComments(CommentToken comment) {
2667 _precedingComment = comment; 2665 _precedingComment = comment;
2668 _setCommentParent(_precedingComment); 2666 _setCommentParent(_precedingComment);
2669 } 2667 }
2670 2668
2671 @override 2669 @override
2672 Token copy() => new TokenWithComment(type, offset, precedingComments); 2670 Token copy() => new TokenWithComment(type, offset, precedingComments);
2673 } 2671 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/resolver.dart ('k') | pkg/analyzer/lib/src/generated/sdk.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698