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

Side by Side Diff: pkg/analysis_server/test/abstract_context.dart

Issue 829133007: Enable enum and deferred import support (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 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) 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 testing.abstract_context; 5 library testing.abstract_context;
6 6
7 import 'package:analyzer/file_system/file_system.dart'; 7 import 'package:analyzer/file_system/file_system.dart';
8 import 'package:analyzer/file_system/memory_file_system.dart'; 8 import 'package:analyzer/file_system/memory_file_system.dart';
9 import 'package:analyzer/src/generated/ast.dart'; 9 import 'package:analyzer/src/generated/ast.dart';
10 import 'package:analyzer/src/generated/element.dart'; 10 import 'package:analyzer/src/generated/element.dart';
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 } 74 }
75 75
76 CompilationUnit resolveLibraryUnit(Source source) { 76 CompilationUnit resolveLibraryUnit(Source source) {
77 return context.resolveCompilationUnit2(source, source); 77 return context.resolveCompilationUnit2(source, source);
78 } 78 }
79 79
80 void setUp() { 80 void setUp() {
81 resourceResolver = new ResourceUriResolver(provider); 81 resourceResolver = new ResourceUriResolver(provider);
82 context = AnalysisEngine.instance.createAnalysisContext(); 82 context = AnalysisEngine.instance.createAnalysisContext();
83 context.sourceFactory = new SourceFactory([SDK_RESOLVER, resourceResolver]); 83 context.sourceFactory = new SourceFactory([SDK_RESOLVER, resourceResolver]);
84 {
85 AnalysisOptionsImpl options =
86 new AnalysisOptionsImpl.con1(context.analysisOptions);
87 options.enableAsync = true;
88 options.enableEnum = true;
89 context.analysisOptions = options;
90 }
91 } 84 }
92 85
93 void tearDown() { 86 void tearDown() {
94 context = null; 87 context = null;
95 provider = null; 88 provider = null;
96 } 89 }
97 } 90 }
98 91
99 92
100 /** 93 /**
101 * Wraps the given [_ElementVisitorFunction] into an instance of 94 * Wraps the given [_ElementVisitorFunction] into an instance of
102 * [engine.GeneralizingElementVisitor]. 95 * [engine.GeneralizingElementVisitor].
103 */ 96 */
104 class _ElementVisitorFunctionWrapper extends GeneralizingElementVisitor { 97 class _ElementVisitorFunctionWrapper extends GeneralizingElementVisitor {
105 final _ElementVisitorFunction function; 98 final _ElementVisitorFunction function;
106 _ElementVisitorFunctionWrapper(this.function); 99 _ElementVisitorFunctionWrapper(this.function);
107 visitElement(Element element) { 100 visitElement(Element element) {
108 function(element); 101 function(element);
109 super.visitElement(element); 102 super.visitElement(element);
110 } 103 }
111 } 104 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/generated_protocol.dart ('k') | pkg/analysis_server/test/analysis_abstract.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698