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

Side by Side Diff: compiler/java/com/google/dart/compiler/parser/DartScanner.java

Issue 10860012: Add support for metadata annotation syntax (issue 4056) (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 package com.google.dart.compiler.parser; 5 package com.google.dart.compiler.parser;
6 6
7 import com.google.dart.compiler.metrics.DartEventType; 7 import com.google.dart.compiler.metrics.DartEventType;
8 import com.google.dart.compiler.metrics.Tracer; 8 import com.google.dart.compiler.metrics.Tracer;
9 import com.google.dart.compiler.metrics.Tracer.TraceEvent; 9 import com.google.dart.compiler.metrics.Tracer.TraceEvent;
10 import com.google.dart.compiler.parser.DartScanner.InternalState.Mode; 10 import com.google.dart.compiler.parser.DartScanner.InternalState.Mode;
(...skipping 1190 matching lines...) Expand 10 before | Expand all | Expand 10 after
1201 return Token.BIT_NOT; 1201 return Token.BIT_NOT;
1202 } 1202 }
1203 1203
1204 case '@': 1204 case '@':
1205 // Raw strings. 1205 // Raw strings.
1206 advance(); 1206 advance();
1207 if (is('\'') || is('"')) { 1207 if (is('\'') || is('"')) {
1208 boolean isRaw = true; 1208 boolean isRaw = true;
1209 return scanString(isRaw); 1209 return scanString(isRaw);
1210 } else { 1210 } else {
1211 return select(Token.ILLEGAL); 1211 return Token.AT;
1212 } 1212 }
1213 1213
1214 case '#': 1214 case '#':
1215 return scanDirective(); 1215 return scanDirective();
1216 1216
1217 default: 1217 default:
1218 if (isIdentifierStart(lookahead(0))) { 1218 if (isIdentifierStart(lookahead(0))) {
1219 boolean allowDollars = true; 1219 boolean allowDollars = true;
1220 return scanIdentifier(allowDollars); 1220 return scanIdentifier(allowDollars);
1221 } 1221 }
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
1331 while (true) { 1331 while (true) {
1332 int c = lookahead(0); 1332 int c = lookahead(0);
1333 if (isLineTerminator(c)) { 1333 if (isLineTerminator(c)) {
1334 } else if (!isWhiteSpace(c)) { 1334 } else if (!isWhiteSpace(c)) {
1335 break; 1335 break;
1336 } 1336 }
1337 advance(); 1337 advance();
1338 } 1338 }
1339 } 1339 }
1340 } 1340 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698