| OLD | NEW |
| 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 #include "vm/parser.h" | 5 #include "vm/parser.h" |
| 6 | 6 |
| 7 #include "vm/bigint_operations.h" | 7 #include "vm/bigint_operations.h" |
| 8 #include "vm/class_finalizer.h" | 8 #include "vm/class_finalizer.h" |
| 9 #include "vm/compiler.h" | 9 #include "vm/compiler.h" |
| 10 #include "vm/compiler_stats.h" | 10 #include "vm/compiler_stats.h" |
| (...skipping 2742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2753 AddInterfaces(interfaces_pos, interface, interfaces); | 2753 AddInterfaces(interfaces_pos, interface, interfaces); |
| 2754 } | 2754 } |
| 2755 | 2755 |
| 2756 // TODO(regis): Remove support for "factory" keyword. | 2756 // TODO(regis): Remove support for "factory" keyword. |
| 2757 if ((CurrentToken() == Token::kDEFAULT) || | 2757 if ((CurrentToken() == Token::kDEFAULT) || |
| 2758 (CurrentToken() == Token::kFACTORY)) { | 2758 (CurrentToken() == Token::kFACTORY)) { |
| 2759 if (CurrentToken() == Token::kFACTORY) { | 2759 if (CurrentToken() == Token::kFACTORY) { |
| 2760 Warning("'factory' is obsolete, use 'default' instead."); | 2760 Warning("'factory' is obsolete, use 'default' instead."); |
| 2761 } | 2761 } |
| 2762 ConsumeToken(); | 2762 ConsumeToken(); |
| 2763 if (CurrentToken() != Token::kIDENT) { |
| 2764 ErrorMsg("class name expected"); |
| 2765 } |
| 2763 const intptr_t factory_pos = token_index_; | 2766 const intptr_t factory_pos = token_index_; |
| 2764 QualIdent factory_name; | 2767 QualIdent factory_name; |
| 2765 ParseQualIdent(&factory_name); | 2768 ParseQualIdent(&factory_name); |
| 2766 if (factory_name.is_local_scope_ident) { | 2769 if (factory_name.is_local_scope_ident) { |
| 2767 ErrorMsg(factory_pos, | 2770 ErrorMsg(factory_pos, |
| 2768 "using '%s' in this context is invalid", | 2771 "using '%s' in this context is invalid", |
| 2769 factory_name.ident->ToCString()); | 2772 factory_name.ident->ToCString()); |
| 2770 } | 2773 } |
| 2771 String& qualifier = String::Handle(); | 2774 String& qualifier = String::Handle(); |
| 2772 if (factory_name.qualifier != NULL) { | 2775 if (factory_name.qualifier != NULL) { |
| (...skipping 4916 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7689 } | 7692 } |
| 7690 | 7693 |
| 7691 | 7694 |
| 7692 void Parser::SkipNestedExpr() { | 7695 void Parser::SkipNestedExpr() { |
| 7693 const bool saved_mode = SetAllowFunctionLiterals(true); | 7696 const bool saved_mode = SetAllowFunctionLiterals(true); |
| 7694 SkipExpr(); | 7697 SkipExpr(); |
| 7695 SetAllowFunctionLiterals(saved_mode); | 7698 SetAllowFunctionLiterals(saved_mode); |
| 7696 } | 7699 } |
| 7697 | 7700 |
| 7698 } // namespace dart | 7701 } // namespace dart |
| OLD | NEW |