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

Side by Side Diff: frog/token.dart

Issue 9121025: cleanup to Value - fix for StringEscapesTest (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 * A single token in the Dart language. 6 * A single token in the Dart language.
7 */ 7 */
8 class Token { 8 class Token {
9 /** A member of [TokenKind] specifying what kind of token this is. */ 9 /** A member of [TokenKind] specifying what kind of token this is. */
10 final int kind; 10 final int kind;
(...skipping 27 matching lines...) Expand all
38 return kindText; 38 return kindText;
39 } 39 }
40 } 40 }
41 41
42 /** Returns a [SourceSpan] representing the source location. */ 42 /** Returns a [SourceSpan] representing the source location. */
43 SourceSpan get span() { 43 SourceSpan get span() {
44 return new SourceSpan(source, start, end); 44 return new SourceSpan(source, start, end);
45 } 45 }
46 } 46 }
47 47
48 /** A token containing a parsed literal value. */
49 class LiteralToken extends Token {
50 var value;
51 LiteralToken(kind, source, start, end, this.value)
52 : super(kind, source, start, end);
53 }
54
48 /** A token containing error information. */ 55 /** A token containing error information. */
49 class ErrorToken extends Token { 56 class ErrorToken extends Token {
50 String message; 57 String message;
51 ErrorToken(kind, source, start, end, this.message) 58 ErrorToken(kind, source, start, end, this.message)
52 : super(kind, source, start, end); 59 : super(kind, source, start, end);
53 } 60 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698