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

Side by Side Diff: compiler/java/com/google/dart/compiler/parser/Token.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 java.util.HashMap; 7 import java.util.HashMap;
8 import java.util.Map; 8 import java.util.Map;
9 9
10 /** 10 /**
11 * Dart tokens and associated data. 11 * Dart tokens and associated data.
12 * 12 *
13 * Note: Token ordinals matter for some accessors, so don't change the order of these without 13 * Note: Token ordinals matter for some accessors, so don't change the order of these without
14 * knowing what you're doing. 14 * knowing what you're doing.
15 */ 15 */
16 public enum Token { 16 public enum Token {
17 /* End-of-stream. */ 17 /* End-of-stream. */
18 EOS(null, 0), 18 EOS(null, 0),
19 19
20 /* Punctuators. */ 20 /* Punctuators. */
21 AT("@", 0),
21 LPAREN("(", 0), 22 LPAREN("(", 0),
22 RPAREN(")", 0), 23 RPAREN(")", 0),
23 LBRACK("[", 0), 24 LBRACK("[", 0),
24 RBRACK("]", 0), 25 RBRACK("]", 0),
25 LBRACE("{", 0), 26 LBRACE("{", 0),
26 RBRACE("}", 0), 27 RBRACE("}", 0),
27 COLON(":", 0), 28 COLON(":", 0),
28 SEMICOLON(";", 0), 29 SEMICOLON(";", 0),
29 PERIOD(".", 0), 30 PERIOD(".", 0),
30 CASCADE("..", 2), 31 CASCADE("..", 2),
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 253
253 @Override 254 @Override
254 public String toString() { 255 public String toString() {
255 String result = getSyntax(); 256 String result = getSyntax();
256 if (result == null) { 257 if (result == null) {
257 return name(); 258 return name();
258 } 259 }
259 return result; 260 return result;
260 } 261 }
261 } 262 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698