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

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

Issue 2772773003: Parse RedirectingConstructorInvocation with Fasta. (Closed)
Patch Set: Created 3 years, 9 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 783 matching lines...) Expand 10 before | Expand all | Expand 10 after
794 [bool enableLazyAssignmentOperators]) { 794 [bool enableLazyAssignmentOperators]) {
795 return _runParser(source, (parser) => parser.parseStatement) as Statement; 795 return _runParser(source, (parser) => parser.parseStatement) as Statement;
796 } 796 }
797 797
798 @override 798 @override
799 Expression parseStringLiteral(String code) { 799 Expression parseStringLiteral(String code) {
800 return _parseExpression(code); 800 return _parseExpression(code);
801 } 801 }
802 802
803 @override 803 @override
804 SuperConstructorInvocation parseSuperConstructorInvocation(String code) { 804 ConstructorInitializer parseConstructorInitializer(String code) {
805 String source = 'class __Test { __Test() : $code; }'; 805 String source = 'class __Test { __Test() : $code; }';
806 var unit = 806 var unit =
807 _runParser(source, (parser) => parser.parseUnit) as CompilationUnit; 807 _runParser(source, (parser) => parser.parseUnit) as CompilationUnit;
808 var clazz = unit.declarations[0] as ClassDeclaration; 808 var clazz = unit.declarations[0] as ClassDeclaration;
809 var constructor = clazz.members[0] as ConstructorDeclaration; 809 var constructor = clazz.members[0] as ConstructorDeclaration;
810 return constructor.initializers.single; 810 return constructor.initializers.single;
811 } 811 }
812 812
813 @override 813 @override
814 SymbolLiteral parseSymbolLiteral(String code) { 814 SymbolLiteral parseSymbolLiteral(String code) {
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
1301 } 1301 }
1302 1302
1303 @override 1303 @override
1304 @failingTest 1304 @failingTest
1305 void test_parsePartOfDirective_uri() { 1305 void test_parsePartOfDirective_uri() {
1306 // TODO(paulberry,ahe): URIs in "part of" declarations are not supported by 1306 // TODO(paulberry,ahe): URIs in "part of" declarations are not supported by
1307 // Fasta. 1307 // Fasta.
1308 super.test_parsePartOfDirective_uri(); 1308 super.test_parsePartOfDirective_uri();
1309 } 1309 }
1310 } 1310 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/fasta/ast_builder.dart ('k') | pkg/analyzer/test/generated/parser_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698