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

Side by Side Diff: pkg/kernel/lib/ast.dart

Issue 2983413002: Resynthesize constructor initializers from Kernel. (Closed)
Patch Set: Created 3 years, 5 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
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 /// ERROR HANDLING 6 /// ERROR HANDLING
7 /// ----------------------------------------------------------------------- 7 /// -----------------------------------------------------------------------
8 /// 8 ///
9 /// As a rule of thumb, errors that can be detected statically are handled by 9 /// As a rule of thumb, errors that can be detected statically are handled by
10 /// the frontend, typically by translating the erroneous code into a 'throw' or 10 /// the frontend, typically by translating the erroneous code into a 'throw' or
(...skipping 1236 matching lines...) Expand 10 before | Expand all | Expand 10 after
1247 Operator, 1247 Operator,
1248 Factory, 1248 Factory,
1249 } 1249 }
1250 1250
1251 // ------------------------------------------------------------------------ 1251 // ------------------------------------------------------------------------
1252 // CONSTRUCTOR INITIALIZERS 1252 // CONSTRUCTOR INITIALIZERS
1253 // ------------------------------------------------------------------------ 1253 // ------------------------------------------------------------------------
1254 1254
1255 /// Part of an initializer list in a constructor. 1255 /// Part of an initializer list in a constructor.
1256 abstract class Initializer extends TreeNode { 1256 abstract class Initializer extends TreeNode {
1257 /// True if this is a synthetic constructor initializer.
1258 @informative
1259 bool isSynthetic = false;
1260
1257 accept(InitializerVisitor v); 1261 accept(InitializerVisitor v);
1258 } 1262 }
1259 1263
1260 /// An initializer with a compile-time error. 1264 /// An initializer with a compile-time error.
1261 /// 1265 ///
1262 /// Should throw an exception at runtime. 1266 /// Should throw an exception at runtime.
1263 // 1267 //
1264 // DESIGN TODO: The frontend should use this in a lot more cases to catch 1268 // DESIGN TODO: The frontend should use this in a lot more cases to catch
1265 // invalid cases. 1269 // invalid cases.
1266 class InvalidInitializer extends Initializer { 1270 class InvalidInitializer extends Initializer {
(...skipping 3400 matching lines...) Expand 10 before | Expand all | Expand 10 after
4667 if (typedef_.canonicalName == null) { 4671 if (typedef_.canonicalName == null) {
4668 throw '$typedef_ has no canonical name'; 4672 throw '$typedef_ has no canonical name';
4669 } 4673 }
4670 return typedef_.canonicalName; 4674 return typedef_.canonicalName;
4671 } 4675 }
4672 4676
4673 /// Annotation describing information which is not part of Dart semantics; in 4677 /// Annotation describing information which is not part of Dart semantics; in
4674 /// other words, if this information (or any information it refers to) changes, 4678 /// other words, if this information (or any information it refers to) changes,
4675 /// static analysis and runtime behavior of the library are unaffected. 4679 /// static analysis and runtime behavior of the library are unaffected.
4676 const informative = null; 4680 const informative = null;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698