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

Side by Side Diff: site/try/poi/scope_information_visitor.dart

Issue 1341253002: Fix try (again!) (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 trydart.poi.scope_information_visitor; 5 library trydart.poi.scope_information_visitor;
6 6
7 import 'package:compiler/src/elements/modelx.dart' as modelx; 7 import 'package:compiler/src/elements/modelx.dart' as modelx;
8 8
9 import 'package:compiler/src/elements/modelx.dart' show 9 import 'package:compiler/src/elements/modelx.dart' show
10 CompilationUnitElementX, 10 CompilationUnitElementX,
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 buffer.write('\n'); 67 buffer.write('\n');
68 indented; 68 indented;
69 serialize(member); 69 serialize(member);
70 isFirst = false; 70 isFirst = false;
71 } 71 }
72 serialize( 72 serialize(
73 e, 73 e,
74 // TODO(ahe): We omit the import scope if there is no current 74 // TODO(ahe): We omit the import scope if there is no current
75 // class. That's wrong. 75 // class. That's wrong.
76 omitEnclosing: ignoreImports || currentClass == null, 76 omitEnclosing: ignoreImports || currentClass == null,
77 name: e.getLibraryName(), 77 name: e.libraryName,
78 serializeEnclosing: () { 78 serializeEnclosing: () {
79 // The enclosing scope of a library is a scope which contains all the 79 // The enclosing scope of a library is a scope which contains all the
80 // imported names. 80 // imported names.
81 isFirst = true; 81 isFirst = true;
82 buffer.write('{\n'); 82 buffer.write('{\n');
83 indentationLevel++; 83 indentationLevel++;
84 indented.write('"kind": "imports",\n'); 84 indented.write('"kind": "imports",\n');
85 indented.write('"members": ['); 85 indented.write('"members": [');
86 indentationLevel++; 86 indentationLevel++;
87 sortElements(importScope(e).importScope.values).forEach(forEach); 87 sortElements(importScope(e).importScope.values).forEach(forEach);
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 } 296 }
297 return result; 297 return result;
298 } 298 }
299 } 299 }
300 300
301 modelx.ScopeX localScope(modelx.LibraryElementX element) => element.localScope; 301 modelx.ScopeX localScope(modelx.LibraryElementX element) => element.localScope;
302 302
303 modelx.ImportScope importScope(modelx.LibraryElementX element) { 303 modelx.ImportScope importScope(modelx.LibraryElementX element) {
304 return element.importScope; 304 return element.importScope;
305 } 305 }
OLDNEW
« no previous file with comments | « no previous file | tests/compiler/dart2js/serialization_test.dart » ('j') | tests/compiler/dart2js/serialization_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698