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 | 6 |
7 #include "lib/invocation_mirror.h" | 7 #include "lib/invocation_mirror.h" |
8 #include "platform/utils.h" | 8 #include "platform/utils.h" |
9 #include "vm/bootstrap.h" | 9 #include "vm/bootstrap.h" |
10 #include "vm/class_finalizer.h" | 10 #include "vm/class_finalizer.h" |
(...skipping 8066 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8077 (original->IsLiteralNode() || | 8077 (original->IsLiteralNode() || |
8078 original->IsLoadLocalNode())) { | 8078 original->IsLoadLocalNode())) { |
8079 name = left_ident->raw(); | 8079 name = left_ident->raw(); |
8080 } | 8080 } |
8081 if (name.IsNull()) { | 8081 if (name.IsNull()) { |
8082 ErrorMsg(left_pos, "expression is not assignable"); | 8082 ErrorMsg(left_pos, "expression is not assignable"); |
8083 } | 8083 } |
8084 result = ThrowNoSuchMethodError( | 8084 result = ThrowNoSuchMethodError( |
8085 original->token_pos(), | 8085 original->token_pos(), |
8086 *target_cls, | 8086 *target_cls, |
8087 name, | 8087 String::Handle(I, Field::SetterName(name)), |
8088 NULL, // No arguments. | 8088 NULL, // No arguments. |
8089 InvocationMirror::kStatic, | 8089 InvocationMirror::kStatic, |
8090 original->IsLoadLocalNode() ? | 8090 original->IsLoadLocalNode() ? |
8091 InvocationMirror::kLocalVar : InvocationMirror::kSetter, | 8091 InvocationMirror::kLocalVar : InvocationMirror::kSetter, |
8092 NULL); // No existing function. | 8092 NULL); // No existing function. |
8093 } else if (result->IsStoreIndexedNode() || | 8093 } else if (result->IsStoreIndexedNode() || |
8094 result->IsInstanceSetterNode() || | 8094 result->IsInstanceSetterNode() || |
8095 result->IsStaticSetterNode() || | 8095 result->IsStaticSetterNode() || |
8096 result->IsStoreStaticFieldNode() || | 8096 result->IsStoreStaticFieldNode() || |
8097 result->IsStoreLocalNode()) { | 8097 result->IsStoreLocalNode()) { |
(...skipping 2968 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11066 void Parser::SkipQualIdent() { | 11066 void Parser::SkipQualIdent() { |
11067 ASSERT(IsIdentifier()); | 11067 ASSERT(IsIdentifier()); |
11068 ConsumeToken(); | 11068 ConsumeToken(); |
11069 if (CurrentToken() == Token::kPERIOD) { | 11069 if (CurrentToken() == Token::kPERIOD) { |
11070 ConsumeToken(); // Consume the kPERIOD token. | 11070 ConsumeToken(); // Consume the kPERIOD token. |
11071 ExpectIdentifier("identifier expected after '.'"); | 11071 ExpectIdentifier("identifier expected after '.'"); |
11072 } | 11072 } |
11073 } | 11073 } |
11074 | 11074 |
11075 } // namespace dart | 11075 } // namespace dart |
OLD | NEW |