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

Side by Side Diff: frog/leg/scanner/token.dart

Issue 8952006: Fix factories in Frog to correspond to the new syntax. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merged, and update test status Created 9 years 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
« no previous file with comments | « frog/await/transformation.dart ('k') | frog/leg/util/link.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) 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 final int EOF_TOKEN = 0; 5 final int EOF_TOKEN = 0;
6 6
7 final int KEYWORD_TOKEN = $k; 7 final int KEYWORD_TOKEN = $k;
8 final int IDENTIFIER_TOKEN = $a; 8 final int IDENTIFIER_TOKEN = $a;
9 final int DOUBLE_TOKEN = $d; 9 final int DOUBLE_TOKEN = $d;
10 final int INT_TOKEN = $i; 10 final int INT_TOKEN = $i;
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 81
82 StringToken(int kind, String value, int charOffset) 82 StringToken(int kind, String value, int charOffset)
83 : this.fromSource(kind, new SourceString(value), charOffset); 83 : this.fromSource(kind, new SourceString(value), charOffset);
84 84
85 StringToken.fromSource(int kind, SourceString this.value, int charOffset) 85 StringToken.fromSource(int kind, SourceString this.value, int charOffset)
86 : super(kind, charOffset); 86 : super(kind, charOffset);
87 87
88 String toString() => value.toString(); 88 String toString() => value.toString();
89 } 89 }
90 90
91 interface SourceString extends Hashable factory StringWrapper { 91 interface SourceString extends Hashable default StringWrapper {
92 const SourceString(String string); 92 const SourceString(String string);
93 93
94 void printOn(StringBuffer sb); 94 void printOn(StringBuffer sb);
95 95
96 String get stringValue(); 96 String get stringValue();
97 } 97 }
98 98
99 class StringWrapper implements SourceString { 99 class StringWrapper implements SourceString {
100 final String stringValue; 100 final String stringValue;
101 101
(...skipping 10 matching lines...) Expand all
112 } 112 }
113 113
114 String toString() => stringValue; 114 String toString() => stringValue;
115 } 115 }
116 116
117 class BeginGroupToken extends StringToken { 117 class BeginGroupToken extends StringToken {
118 Token endGroup; 118 Token endGroup;
119 BeginGroupToken(int kind, String value, int charOffset) 119 BeginGroupToken(int kind, String value, int charOffset)
120 : super(kind, value, charOffset); 120 : super(kind, value, charOffset);
121 } 121 }
OLDNEW
« no previous file with comments | « frog/await/transformation.dart ('k') | frog/leg/util/link.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698