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

Side by Side Diff: pkg/analyzer/test/generated/parser_fasta_test.dart

Issue 2788913002: Prepare for separate setter scope. (Closed)
Patch Set: Address comments. Created 3 years, 8 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) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 import 'package:analyzer/dart/ast/ast.dart'; 5 import 'package:analyzer/dart/ast/ast.dart';
6 import 'package:analyzer/dart/ast/token.dart' as analyzer; 6 import 'package:analyzer/dart/ast/token.dart' as analyzer;
7 import 'package:analyzer/dart/element/element.dart'; 7 import 'package:analyzer/dart/element/element.dart';
8 import 'package:analyzer/error/error.dart'; 8 import 'package:analyzer/error/error.dart';
9 import 'package:analyzer/src/fasta/ast_builder.dart'; 9 import 'package:analyzer/src/fasta/ast_builder.dart';
10 import 'package:analyzer/src/fasta/element_store.dart'; 10 import 'package:analyzer/src/fasta/element_store.dart';
(...skipping 1019 matching lines...) Expand 10 before | Expand all | Expand 10 after
1030 class ScopeProxy implements Scope { 1030 class ScopeProxy implements Scope {
1031 final _locals = <String, Builder>{}; 1031 final _locals = <String, Builder>{};
1032 1032
1033 @override 1033 @override
1034 void operator []=(String name, Builder member) { 1034 void operator []=(String name, Builder member) {
1035 _locals[name] = member; 1035 _locals[name] = member;
1036 } 1036 }
1037 1037
1038 @override 1038 @override
1039 Scope createNestedScope({bool isModifiable: true}) { 1039 Scope createNestedScope({bool isModifiable: true}) {
1040 return new Scope(<String, Builder>{}, this, isModifiable: isModifiable); 1040 return new Scope.nested(this, isModifiable: isModifiable);
1041 } 1041 }
1042 1042
1043 @override 1043 @override
1044 Builder lookup(String name, int charOffset, Uri fileUri) => 1044 Builder lookup(String name, int charOffset, Uri fileUri,
1045 {bool isInstanceScope: true}) =>
1045 _locals.putIfAbsent(name, () => new BuilderProxy()); 1046 _locals.putIfAbsent(name, () => new BuilderProxy());
1046 1047
1047 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); 1048 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
1048 } 1049 }
1049 1050
1050 /** 1051 /**
1051 * Tests of the fasta parser based on [StatementParserTestMixin]. 1052 * Tests of the fasta parser based on [StatementParserTestMixin].
1052 */ 1053 */
1053 @reflectiveTest 1054 @reflectiveTest
1054 class StatementParserTest_Fasta extends FastaParserTestCase 1055 class StatementParserTest_Fasta extends FastaParserTestCase
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
1195 } 1196 }
1196 1197
1197 @override 1198 @override
1198 @failingTest 1199 @failingTest
1199 void test_parsePartOfDirective_uri() { 1200 void test_parsePartOfDirective_uri() {
1200 // TODO(paulberry,ahe): URIs in "part of" declarations are not supported by 1201 // TODO(paulberry,ahe): URIs in "part of" declarations are not supported by
1201 // Fasta. 1202 // Fasta.
1202 super.test_parsePartOfDirective_uri(); 1203 super.test_parsePartOfDirective_uri();
1203 } 1204 }
1204 } 1205 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/fasta/element_store.dart ('k') | pkg/front_end/lib/src/fasta/builder/class_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698