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

Side by Side Diff: dart/lib/compiler/implementation/elements/elements.dart

Issue 10831332: Support new getter syntax. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 4 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 | Annotate | Revision Log
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 #library('elements'); 5 #library('elements');
6 6
7 #import('dart:uri'); 7 #import('dart:uri');
8 8
9 #import('../tree/tree.dart'); 9 #import('../tree/tree.dart');
10 #import('../scanner/scannerlib.dart'); 10 #import('../scanner/scannerlib.dart');
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 if (libraryTag !== null) { 462 if (libraryTag !== null) {
463 return libraryTag.argument.dartString.slowToString(); 463 return libraryTag.argument.dartString.slowToString();
464 } else { 464 } else {
465 // Use the file name as script name. 465 // Use the file name as script name.
466 String path = uri.path; 466 String path = uri.path;
467 return path.substring(path.lastIndexOf('/') + 1); 467 return path.substring(path.lastIndexOf('/') + 1);
468 } 468 }
469 } 469 }
470 470
471 Scope buildEnclosingScope() => new TopScope(this); 471 Scope buildEnclosingScope() => new TopScope(this);
472
473 bool get isPlatformLibrary => uri.scheme == "dart";
472 } 474 }
473 475
474 class PrefixElement extends Element { 476 class PrefixElement extends Element {
475 Map<SourceString, Element> imported; 477 Map<SourceString, Element> imported;
476 Token firstPosition; 478 Token firstPosition;
477 479
478 PrefixElement(SourceString prefix, Element enclosing, this.firstPosition) 480 PrefixElement(SourceString prefix, Element enclosing, this.firstPosition)
479 : imported = new Map<SourceString, Element>(), 481 : imported = new Map<SourceString, Element>(),
480 super(prefix, ElementKind.PREFIX, enclosing); 482 super(prefix, ElementKind.PREFIX, enclosing);
481 483
(...skipping 1024 matching lines...) Expand 10 before | Expand all | Expand 10 after
1506 Node parseNode(compiler) => cachedNode; 1508 Node parseNode(compiler) => cachedNode;
1507 1509
1508 String toString() => "${enclosingElement.toString()}.${name.slowToString()}"; 1510 String toString() => "${enclosingElement.toString()}.${name.slowToString()}";
1509 1511
1510 TypeVariableElement cloneTo(Element enclosing, DiagnosticListener listener) { 1512 TypeVariableElement cloneTo(Element enclosing, DiagnosticListener listener) {
1511 TypeVariableElement result = 1513 TypeVariableElement result =
1512 new TypeVariableElement(name, enclosing, cachedNode, type, bound); 1514 new TypeVariableElement(name, enclosing, cachedNode, type, bound);
1513 return result; 1515 return result;
1514 } 1516 }
1515 } 1517 }
OLDNEW
« no previous file with comments | « no previous file | dart/lib/compiler/implementation/lib/native_helper.dart » ('j') | dart/lib/compiler/implementation/resolver.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698