| OLD | NEW |
| 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 #include "vm/parser.h" | 5 #include "vm/parser.h" |
| 6 #include "vm/flags.h" | 6 #include "vm/flags.h" |
| 7 | 7 |
| 8 #ifndef DART_PRECOMPILED_RUNTIME | 8 #ifndef DART_PRECOMPILED_RUNTIME |
| 9 | 9 |
| 10 #include "lib/invocation_mirror.h" | 10 #include "lib/invocation_mirror.h" |
| (...skipping 4094 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4105 if (member.has_const) { | 4105 if (member.has_const) { |
| 4106 ReportError("identifier expected after 'const'"); | 4106 ReportError("identifier expected after 'const'"); |
| 4107 } | 4107 } |
| 4108 if (member.has_final) { | 4108 if (member.has_final) { |
| 4109 ReportError("identifier expected after 'final'"); | 4109 ReportError("identifier expected after 'final'"); |
| 4110 } | 4110 } |
| 4111 ConsumeToken(); | 4111 ConsumeToken(); |
| 4112 member.has_var = true; | 4112 member.has_var = true; |
| 4113 // The member type is the 'dynamic' type. | 4113 // The member type is the 'dynamic' type. |
| 4114 member.type = &Object::dynamic_type(); | 4114 member.type = &Object::dynamic_type(); |
| 4115 } else if (CurrentToken() == Token::kFACTORY) { | 4115 } else if ((CurrentToken() == Token::kFACTORY) && |
| 4116 (LookaheadToken(1) != Token::kLPAREN)) { |
| 4116 ConsumeToken(); | 4117 ConsumeToken(); |
| 4117 if (member.has_static) { | 4118 if (member.has_static) { |
| 4118 ReportError("factory method cannot be explicitly marked static"); | 4119 ReportError("factory method cannot be explicitly marked static"); |
| 4119 } | 4120 } |
| 4120 member.has_factory = true; | 4121 member.has_factory = true; |
| 4121 member.has_static = true; | 4122 member.has_static = true; |
| 4122 // The result type depends on the name of the factory method. | 4123 // The result type depends on the name of the factory method. |
| 4123 } | 4124 } |
| 4124 // Optionally parse a type. | 4125 // Optionally parse a type. |
| 4125 if (CurrentToken() == Token::kVOID) { | 4126 if (CurrentToken() == Token::kVOID) { |
| (...skipping 10227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14353 const ArgumentListNode& function_args, | 14354 const ArgumentListNode& function_args, |
| 14354 const LocalVariable* temp_for_last_arg, | 14355 const LocalVariable* temp_for_last_arg, |
| 14355 bool is_super_invocation) { | 14356 bool is_super_invocation) { |
| 14356 UNREACHABLE(); | 14357 UNREACHABLE(); |
| 14357 return NULL; | 14358 return NULL; |
| 14358 } | 14359 } |
| 14359 | 14360 |
| 14360 } // namespace dart | 14361 } // namespace dart |
| 14361 | 14362 |
| 14362 #endif // DART_PRECOMPILED_RUNTIME | 14363 #endif // DART_PRECOMPILED_RUNTIME |
| OLD | NEW |