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

Side by Side Diff: dart/lib/compiler/implementation/scanner/keyword.dart

Issue 10892005: Revert "Support unary - operator." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 3 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 keyword in the Dart programming language. 6 * A keyword in the Dart programming language.
7 */ 7 */
8 class Keyword implements SourceString { 8 class Keyword implements SourceString {
9 static const Keyword BREAK = const Keyword("break"); 9 static const Keyword BREAK = const Keyword("break");
10 static const Keyword CASE = const Keyword("case"); 10 static const Keyword CASE = const Keyword("case");
(...skipping 30 matching lines...) Expand all
41 static const Keyword AS = const Keyword("as", info: AS_INFO, isPseudo: true); 41 static const Keyword AS = const Keyword("as", info: AS_INFO, isPseudo: true);
42 static const Keyword ASSERT = const Keyword("assert", isPseudo: true); 42 static const Keyword ASSERT = const Keyword("assert", isPseudo: true);
43 static const Keyword EXTERNAL = const Keyword("external", isPseudo: true); 43 static const Keyword EXTERNAL = const Keyword("external", isPseudo: true);
44 static const Keyword FACTORY = const Keyword("factory", isPseudo: true); 44 static const Keyword FACTORY = const Keyword("factory", isPseudo: true);
45 static const Keyword GET = const Keyword("get", isPseudo: true); 45 static const Keyword GET = const Keyword("get", isPseudo: true);
46 static const Keyword IMPLEMENTS = const Keyword("implements", isPseudo: true); 46 static const Keyword IMPLEMENTS = const Keyword("implements", isPseudo: true);
47 static const Keyword IMPORT = const Keyword("import", isPseudo: true); 47 static const Keyword IMPORT = const Keyword("import", isPseudo: true);
48 static const Keyword INTERFACE = const Keyword("interface", isPseudo: true); 48 static const Keyword INTERFACE = const Keyword("interface", isPseudo: true);
49 static const Keyword LIBRARY = const Keyword("library", isPseudo: true); 49 static const Keyword LIBRARY = const Keyword("library", isPseudo: true);
50 static const Keyword NATIVE = const Keyword("native", isPseudo: true); 50 static const Keyword NATIVE = const Keyword("native", isPseudo: true);
51 static const Keyword NEGATE = const Keyword("negate", isPseudo: true);
51 static const Keyword OPERATOR = const Keyword("operator", isPseudo: true); 52 static const Keyword OPERATOR = const Keyword("operator", isPseudo: true);
52 static const Keyword ON = const Keyword("on", isPseudo: true); 53 static const Keyword ON = const Keyword("on", isPseudo: true);
53 static const Keyword SET = const Keyword("set", isPseudo: true); 54 static const Keyword SET = const Keyword("set", isPseudo: true);
54 static const Keyword SOURCE = const Keyword("source", isPseudo: true); 55 static const Keyword SOURCE = const Keyword("source", isPseudo: true);
55 static const Keyword STATIC = const Keyword("static", isPseudo: true); 56 static const Keyword STATIC = const Keyword("static", isPseudo: true);
56 static const Keyword TYPEDEF = const Keyword("typedef", isPseudo: true); 57 static const Keyword TYPEDEF = const Keyword("typedef", isPseudo: true);
57 58
58 static const List<Keyword> values = const <Keyword> [ 59 static const List<Keyword> values = const <Keyword> [
59 AS, 60 AS,
60 BREAK, 61 BREAK,
(...skipping 28 matching lines...) Expand all
89 CLASS, 90 CLASS,
90 EXTENDS, 91 EXTENDS,
91 EXTERNAL, 92 EXTERNAL,
92 FACTORY, 93 FACTORY,
93 GET, 94 GET,
94 IMPLEMENTS, 95 IMPLEMENTS,
95 IMPORT, 96 IMPORT,
96 INTERFACE, 97 INTERFACE,
97 LIBRARY, 98 LIBRARY,
98 NATIVE, 99 NATIVE,
100 NEGATE,
99 OPERATOR, 101 OPERATOR,
100 ON, 102 ON,
101 SET, 103 SET,
102 SOURCE, 104 SOURCE,
103 STATIC, 105 STATIC,
104 TYPEDEF ]; 106 TYPEDEF ];
105 107
106 final String syntax; 108 final String syntax;
107 final bool isPseudo; 109 final bool isPseudo;
108 final PrecedenceInfo info; 110 final PrecedenceInfo info;
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 final Keyword keyword; 257 final Keyword keyword;
256 258
257 LeafKeywordState(String syntax) : keyword = Keyword.keywords[syntax]; 259 LeafKeywordState(String syntax) : keyword = Keyword.keywords[syntax];
258 260
259 bool isLeaf() => true; 261 bool isLeaf() => true;
260 262
261 KeywordState next(int c) => null; 263 KeywordState next(int c) => null;
262 264
263 String toString() => keyword.syntax; 265 String toString() => keyword.syntax;
264 } 266 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698