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

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

Issue 10702204: Revert "Allow patch files to add top-level declarations to the patched library." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 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 interface TreeElements { 5 interface TreeElements {
6 Element operator[](Node node); 6 Element operator[](Node node);
7 Selector getSelector(Send send); 7 Selector getSelector(Send send);
8 Type getType(TypeAnnotation annotation); 8 Type getType(TypeAnnotation annotation);
9 } 9 }
10 10
(...skipping 1849 matching lines...) Expand 10 before | Expand all | Expand 10 after
1860 } 1860 }
1861 1861
1862 class VariableDefinitionsVisitor extends CommonResolverVisitor<SourceString> { 1862 class VariableDefinitionsVisitor extends CommonResolverVisitor<SourceString> {
1863 VariableDefinitions definitions; 1863 VariableDefinitions definitions;
1864 ResolverVisitor resolver; 1864 ResolverVisitor resolver;
1865 ElementKind kind; 1865 ElementKind kind;
1866 VariableListElement variables; 1866 VariableListElement variables;
1867 1867
1868 VariableDefinitionsVisitor(Compiler compiler, 1868 VariableDefinitionsVisitor(Compiler compiler,
1869 this.definitions, this.resolver, this.kind) 1869 this.definitions, this.resolver, this.kind)
1870 : super(compiler) { 1870 : super(compiler)
1871 {
1871 variables = new VariableListElement.node( 1872 variables = new VariableListElement.node(
1872 definitions, ElementKind.VARIABLE_LIST, resolver.context.element); 1873 definitions, ElementKind.VARIABLE_LIST, resolver.context.element);
1873 } 1874 }
1874 1875
1875 SourceString visitSendSet(SendSet node) { 1876 SourceString visitSendSet(SendSet node) {
1876 assert(node.arguments.tail.isEmpty()); // Sanity check 1877 assert(node.arguments.tail.isEmpty()); // Sanity check
1877 resolver.visit(node.arguments.head); 1878 resolver.visit(node.arguments.head);
1878 return visit(node.selector); 1879 return visit(node.selector);
1879 } 1880 }
1880 1881
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
2204 2205
2205 TopScope(LibraryElement library) : super(null, library); 2206 TopScope(LibraryElement library) : super(null, library);
2206 Element lookup(SourceString name) { 2207 Element lookup(SourceString name) {
2207 return library.find(name); 2208 return library.find(name);
2208 } 2209 }
2209 2210
2210 Element add(Element newElement) { 2211 Element add(Element newElement) {
2211 throw "Cannot add an element in the top scope"; 2212 throw "Cannot add an element in the top scope";
2212 } 2213 }
2213 } 2214 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/patch_parser.dart ('k') | lib/compiler/implementation/scanner/class_element_parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698