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

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

Issue 10831262: Revert "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: Fixed bugs 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 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 1905 matching lines...) Expand 10 before | Expand all | Expand 10 after
1916 } 1916 }
1917 1917
1918 class VariableDefinitionsVisitor extends CommonResolverVisitor<SourceString> { 1918 class VariableDefinitionsVisitor extends CommonResolverVisitor<SourceString> {
1919 VariableDefinitions definitions; 1919 VariableDefinitions definitions;
1920 ResolverVisitor resolver; 1920 ResolverVisitor resolver;
1921 ElementKind kind; 1921 ElementKind kind;
1922 VariableListElement variables; 1922 VariableListElement variables;
1923 1923
1924 VariableDefinitionsVisitor(Compiler compiler, 1924 VariableDefinitionsVisitor(Compiler compiler,
1925 this.definitions, this.resolver, this.kind) 1925 this.definitions, this.resolver, this.kind)
1926 : super(compiler) 1926 : super(compiler) {
1927 {
1928 variables = new VariableListElement.node( 1927 variables = new VariableListElement.node(
1929 definitions, ElementKind.VARIABLE_LIST, resolver.scope.element); 1928 definitions, ElementKind.VARIABLE_LIST, resolver.scope.element);
1930 } 1929 }
1931 1930
1932 SourceString visitSendSet(SendSet node) { 1931 SourceString visitSendSet(SendSet node) {
1933 assert(node.arguments.tail.isEmpty()); // Sanity check 1932 assert(node.arguments.tail.isEmpty()); // Sanity check
1934 resolver.visit(node.arguments.head); 1933 resolver.visit(node.arguments.head);
1935 return visit(node.selector); 1934 return visit(node.selector);
1936 } 1935 }
1937 1936
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
2310 TopScope(LibraryElement library) : super(null, library); 2309 TopScope(LibraryElement library) : super(null, library);
2311 Element lookup(SourceString name) { 2310 Element lookup(SourceString name) {
2312 return library.find(name); 2311 return library.find(name);
2313 } 2312 }
2314 2313
2315 Element add(Element newElement) { 2314 Element add(Element newElement) {
2316 throw "Cannot add an element in the top scope"; 2315 throw "Cannot add an element in the top scope";
2317 } 2316 }
2318 String toString() => '$element'; 2317 String toString() => '$element';
2319 } 2318 }
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