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

Side by Side Diff: pkg/analyzer/lib/dart/ast/token.dart

Issue 1909843002: Pull the 'keyword' property into Token. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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
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 /** 5 /**
6 * Defines the tokens that are produced by the scanner, used by the parser, and 6 * Defines the tokens that are produced by the scanner, used by the parser, and
7 * referenced from the [AST structure](ast.dart). 7 * referenced from the [AST structure](ast.dart).
8 */ 8 */
9 library analyzer.dart.ast.token; 9 library analyzer.dart.ast.token;
10 10
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 */ 243 */
244 bool get isSynthetic; 244 bool get isSynthetic;
245 245
246 /** 246 /**
247 * Return `true` if this token represents an operator that can be defined by 247 * Return `true` if this token represents an operator that can be defined by
248 * users. 248 * users.
249 */ 249 */
250 bool get isUserDefinableOperator; 250 bool get isUserDefinableOperator;
251 251
252 /** 252 /**
253 * Return the keyword, if a keyword token, or `null` otherwise.
254 */
255 Keyword get keyword;
256
257 /**
253 * Return the number of characters in the node's source range. 258 * Return the number of characters in the node's source range.
254 */ 259 */
255 int get length; 260 int get length;
256 261
257 /** 262 /**
258 * Return the lexeme that represents this token. 263 * Return the lexeme that represents this token.
259 */ 264 */
260 String get lexeme; 265 String get lexeme;
261 266
262 /** 267 /**
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
729 */ 734 */
730 class _EndOfFileTokenType extends TokenType { 735 class _EndOfFileTokenType extends TokenType {
731 /** 736 /**
732 * Initialize a newly created token. 737 * Initialize a newly created token.
733 */ 738 */
734 const _EndOfFileTokenType() : super._('EOF', TokenClass.NO_CLASS, ''); 739 const _EndOfFileTokenType() : super._('EOF', TokenClass.NO_CLASS, '');
735 740
736 @override 741 @override
737 String toString() => '-eof-'; 742 String toString() => '-eof-';
738 } 743 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698