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

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

Issue 1039713002: Rename MethodInvocation.period to MethodInvocation.operator. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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 | 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 engine.parser_test; 5 library engine.parser_test;
6 6
7 import 'package:analyzer/src/generated/ast.dart'; 7 import 'package:analyzer/src/generated/ast.dart';
8 import 'package:analyzer/src/generated/element.dart'; 8 import 'package:analyzer/src/generated/element.dart';
9 import 'package:analyzer/src/generated/error.dart'; 9 import 'package:analyzer/src/generated/error.dart';
10 import 'package:analyzer/src/generated/incremental_scanner.dart'; 10 import 'package:analyzer/src/generated/incremental_scanner.dart';
(...skipping 4978 matching lines...) Expand 10 before | Expand all | Expand 10 after
4989 parse4("parseCascadeSection", "..[i](b)"); 4989 parse4("parseCascadeSection", "..[i](b)");
4990 EngineTestCase.assertInstanceOf( 4990 EngineTestCase.assertInstanceOf(
4991 (obj) => obj is IndexExpression, IndexExpression, section.function); 4991 (obj) => obj is IndexExpression, IndexExpression, section.function);
4992 expect(section.argumentList, isNotNull); 4992 expect(section.argumentList, isNotNull);
4993 } 4993 }
4994 4994
4995 void test_parseCascadeSection_ii() { 4995 void test_parseCascadeSection_ii() {
4996 MethodInvocation section = parse4("parseCascadeSection", "..a(b).c(d)"); 4996 MethodInvocation section = parse4("parseCascadeSection", "..a(b).c(d)");
4997 EngineTestCase.assertInstanceOf( 4997 EngineTestCase.assertInstanceOf(
4998 (obj) => obj is MethodInvocation, MethodInvocation, section.target); 4998 (obj) => obj is MethodInvocation, MethodInvocation, section.target);
4999 expect(section.period, isNotNull); 4999 expect(section.operator, isNotNull);
5000 expect(section.methodName, isNotNull); 5000 expect(section.methodName, isNotNull);
5001 expect(section.argumentList, isNotNull); 5001 expect(section.argumentList, isNotNull);
5002 expect(section.argumentList.arguments, hasLength(1)); 5002 expect(section.argumentList.arguments, hasLength(1));
5003 } 5003 }
5004 5004
5005 void test_parseCascadeSection_p() { 5005 void test_parseCascadeSection_p() {
5006 PropertyAccess section = parse4("parseCascadeSection", "..a"); 5006 PropertyAccess section = parse4("parseCascadeSection", "..a");
5007 expect(section.target, isNull); 5007 expect(section.target, isNull);
5008 expect(section.operator, isNotNull); 5008 expect(section.operator, isNotNull);
5009 expect(section.propertyName, isNotNull); 5009 expect(section.propertyName, isNotNull);
(...skipping 20 matching lines...) Expand all
5030 void test_parseCascadeSection_p_builtIn() { 5030 void test_parseCascadeSection_p_builtIn() {
5031 PropertyAccess section = parse4("parseCascadeSection", "..as"); 5031 PropertyAccess section = parse4("parseCascadeSection", "..as");
5032 expect(section.target, isNull); 5032 expect(section.target, isNull);
5033 expect(section.operator, isNotNull); 5033 expect(section.operator, isNotNull);
5034 expect(section.propertyName, isNotNull); 5034 expect(section.propertyName, isNotNull);
5035 } 5035 }
5036 5036
5037 void test_parseCascadeSection_pa() { 5037 void test_parseCascadeSection_pa() {
5038 MethodInvocation section = parse4("parseCascadeSection", "..a(b)"); 5038 MethodInvocation section = parse4("parseCascadeSection", "..a(b)");
5039 expect(section.target, isNull); 5039 expect(section.target, isNull);
5040 expect(section.period, isNotNull); 5040 expect(section.operator, isNotNull);
5041 expect(section.methodName, isNotNull); 5041 expect(section.methodName, isNotNull);
5042 expect(section.argumentList, isNotNull); 5042 expect(section.argumentList, isNotNull);
5043 expect(section.argumentList.arguments, hasLength(1)); 5043 expect(section.argumentList.arguments, hasLength(1));
5044 } 5044 }
5045 5045
5046 void test_parseCascadeSection_paa() { 5046 void test_parseCascadeSection_paa() {
5047 FunctionExpressionInvocation section = 5047 FunctionExpressionInvocation section =
5048 parse4("parseCascadeSection", "..a(b)(c)"); 5048 parse4("parseCascadeSection", "..a(b)(c)");
5049 EngineTestCase.assertInstanceOf( 5049 EngineTestCase.assertInstanceOf(
5050 (obj) => obj is MethodInvocation, MethodInvocation, section.function); 5050 (obj) => obj is MethodInvocation, MethodInvocation, section.function);
(...skipping 4774 matching lines...) Expand 10 before | Expand all | Expand 10 after
9825 new Scanner(null, new CharSequenceReader(source), listener); 9825 new Scanner(null, new CharSequenceReader(source), listener);
9826 Token tokenStream = scanner.tokenize(); 9826 Token tokenStream = scanner.tokenize();
9827 // 9827 //
9828 // Parse the source. 9828 // Parse the source.
9829 // 9829 //
9830 Parser parser = new Parser(null, listener); 9830 Parser parser = new Parser(null, listener);
9831 return invokeParserMethodImpl( 9831 return invokeParserMethodImpl(
9832 parser, methodName, <Object>[tokenStream], tokenStream) as Token; 9832 parser, methodName, <Object>[tokenStream], tokenStream) as Token;
9833 } 9833 }
9834 } 9834 }
OLDNEW
« pkg/analyzer/lib/src/generated/ast.dart ('K') | « pkg/analyzer/lib/src/generated/parser.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698