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

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

Issue 201613006: Introduces the new syntax for deferred loading (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 const Keyword("part", isBuiltIn: true), 59 const Keyword("part", isBuiltIn: true),
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 71
71 final String syntax; 72 final String syntax;
72 final bool isPseudo; 73 final bool isPseudo;
73 final bool isBuiltIn; 74 final bool isBuiltIn;
74 final PrecedenceInfo info; 75 final PrecedenceInfo info;
75 76
76 static Map<String, Keyword> _keywords; 77 static Map<String, Keyword> _keywords;
77 static Map<String, Keyword> get keywords { 78 static Map<String, Keyword> get keywords {
78 if (_keywords == null) { 79 if (_keywords == null) {
79 _keywords = computeKeywordMap(); 80 _keywords = computeKeywordMap();
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 /** 196 /**
196 * A state that has no outgoing transitions. 197 * A state that has no outgoing transitions.
197 */ 198 */
198 class LeafKeywordState extends KeywordState { 199 class LeafKeywordState extends KeywordState {
199 LeafKeywordState(String syntax) : super(Keyword.keywords[syntax]); 200 LeafKeywordState(String syntax) : super(Keyword.keywords[syntax]);
200 201
201 KeywordState next(int c) => null; 202 KeywordState next(int c) => null;
202 203
203 String toString() => keyword.syntax; 204 String toString() => keyword.syntax;
204 } 205 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698