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

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

Issue 675113002: Support async/await in the dart2js frontend. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update unittests Created 6 years, 1 month 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 part of scanner; 5 part of scanner;
6 6
7 /** 7 /**
8 * A keyword in the Dart programming language. 8 * A keyword in the Dart programming language.
9 */ 9 */
10 class Keyword { 10 class Keyword {
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 const Keyword("set", isBuiltIn: true), 60 const Keyword("set", isBuiltIn: true),
61 const Keyword("static", isBuiltIn: true), 61 const Keyword("static", isBuiltIn: true),
62 const Keyword("typedef", isBuiltIn: true), 62 const Keyword("typedef", isBuiltIn: true),
63 63
64 const Keyword("hide", isPseudo: true), 64 const Keyword("hide", isPseudo: true),
65 const Keyword("native", isPseudo: true), 65 const Keyword("native", isPseudo: true),
66 const Keyword("of", isPseudo: true), 66 const Keyword("of", isPseudo: true),
67 const Keyword("on", isPseudo: true), 67 const Keyword("on", isPseudo: true),
68 const Keyword("show", isPseudo: true), 68 const Keyword("show", isPseudo: true),
69 const Keyword("source", isPseudo: true), 69 const Keyword("source", isPseudo: true),
70 const Keyword("deferred", isPseudo: true)]; 70 const Keyword("deferred", isPseudo: true),
71 const Keyword("async", isPseudo: true),
72 const Keyword("sync", isPseudo: true),
73 const Keyword("await", isPseudo: true),
74 const Keyword("yield", isPseudo: true)];
71 75
72 final String syntax; 76 final String syntax;
73 final bool isPseudo; 77 final bool isPseudo;
74 final bool isBuiltIn; 78 final bool isBuiltIn;
75 final PrecedenceInfo info; 79 final PrecedenceInfo info;
76 80
77 static Map<String, Keyword> _keywords; 81 static Map<String, Keyword> _keywords;
78 static Map<String, Keyword> get keywords { 82 static Map<String, Keyword> get keywords {
79 if (_keywords == null) { 83 if (_keywords == null) {
80 _keywords = computeKeywordMap(); 84 _keywords = computeKeywordMap();
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 /** 200 /**
197 * A state that has no outgoing transitions. 201 * A state that has no outgoing transitions.
198 */ 202 */
199 class LeafKeywordState extends KeywordState { 203 class LeafKeywordState extends KeywordState {
200 LeafKeywordState(String syntax) : super(Keyword.keywords[syntax]); 204 LeafKeywordState(String syntax) : super(Keyword.keywords[syntax]);
201 205
202 KeywordState next(int c) => null; 206 KeywordState next(int c) => null;
203 207
204 String toString() => keyword.syntax; 208 String toString() => keyword.syntax;
205 } 209 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698