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

Side by Side Diff: runtime/vm/parser.cc

Issue 11225050: Make super accessible in closures. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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
« no previous file with comments | « no previous file | tests/co19/co19-runtime.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "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 9405 matching lines...) Expand 10 before | Expand all | Expand 10 after
9416 primary = ParseNewOperator(); 9416 primary = ParseNewOperator();
9417 } 9417 }
9418 } else if (CurrentToken() == Token::kLT || 9418 } else if (CurrentToken() == Token::kLT ||
9419 CurrentToken() == Token::kLBRACK || 9419 CurrentToken() == Token::kLBRACK ||
9420 CurrentToken() == Token::kINDEX || 9420 CurrentToken() == Token::kINDEX ||
9421 CurrentToken() == Token::kLBRACE) { 9421 CurrentToken() == Token::kLBRACE) {
9422 primary = ParseCompoundLiteral(); 9422 primary = ParseCompoundLiteral();
9423 } else if (CurrentToken() == Token::kSUPER) { 9423 } else if (CurrentToken() == Token::kSUPER) {
9424 if (current_function().is_static()) { 9424 if (current_function().is_static()) {
9425 ErrorMsg("cannot access superclass from static method"); 9425 ErrorMsg("cannot access superclass from static method");
9426 } else if (current_function().IsLocalFunction()) {
9427 ErrorMsg("cannot access superclass from local function");
9428 } 9426 }
9429 ConsumeToken(); 9427 ConsumeToken();
9430 if (CurrentToken() == Token::kPERIOD) { 9428 if (CurrentToken() == Token::kPERIOD) {
9431 ConsumeToken(); 9429 ConsumeToken();
9432 const String& ident = *ExpectIdentifier("identifier expected"); 9430 const String& ident = *ExpectIdentifier("identifier expected");
9433 if (CurrentToken() == Token::kLPAREN) { 9431 if (CurrentToken() == Token::kLPAREN) {
9434 primary = ParseSuperCall(ident); 9432 primary = ParseSuperCall(ident);
9435 } else { 9433 } else {
9436 primary = ParseSuperFieldAccess(ident); 9434 primary = ParseSuperFieldAccess(ident);
9437 } 9435 }
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
9756 void Parser::SkipQualIdent() { 9754 void Parser::SkipQualIdent() {
9757 ASSERT(IsIdentifier()); 9755 ASSERT(IsIdentifier());
9758 ConsumeToken(); 9756 ConsumeToken();
9759 if (CurrentToken() == Token::kPERIOD) { 9757 if (CurrentToken() == Token::kPERIOD) {
9760 ConsumeToken(); // Consume the kPERIOD token. 9758 ConsumeToken(); // Consume the kPERIOD token.
9761 ExpectIdentifier("identifier expected after '.'"); 9759 ExpectIdentifier("identifier expected after '.'");
9762 } 9760 }
9763 } 9761 }
9764 9762
9765 } // namespace dart 9763 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | tests/co19/co19-runtime.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698