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

Side by Side Diff: pkg/front_end/lib/src/fasta/kernel/fasta_accessors.dart

Issue 2965393002: Use FastaMessage instead of String. Part 1. (Closed)
Patch Set: Add type variable to Code. Created 3 years, 5 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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 fasta.fasta_accessors; 5 library fasta.fasta_accessors;
6 6
7 import 'package:front_end/src/fasta/kernel/kernel_shadow_ast.dart' 7 import 'package:kernel/ast.dart'
8 hide InvalidExpression, InvalidInitializer, InvalidStatement;
9
10 import '../../scanner/token.dart' show Token;
11
12 import '../deprecated_problems.dart' show deprecated_internalProblem;
13
14 import '../messages.dart' show Message;
15
16 import '../names.dart' show callName, lengthName;
17
18 import '../scope.dart'
19 show deprecated_AccessErrorBuilder, ProblemBuilder, Scope;
20
21 import '../type_inference/type_promotion.dart' show TypePromoter;
22
23 import 'kernel_shadow_ast.dart'
8 show 24 show
9 KernelArguments, 25 KernelArguments,
10 KernelComplexAssignment, 26 KernelComplexAssignment,
11 KernelIndexAssign, 27 KernelIndexAssign,
12 KernelPropertyAssign, 28 KernelPropertyAssign,
13 KernelStaticAssignment, 29 KernelStaticAssignment,
14 KernelThisExpression, 30 KernelThisExpression,
15 KernelTypeLiteral, 31 KernelTypeLiteral,
16 KernelVariableAssignment; 32 KernelVariableAssignment;
17 33
18 import 'package:front_end/src/fasta/kernel/utils.dart' show offsetForToken; 34 import 'utils.dart' show offsetForToken;
19
20 import 'package:front_end/src/scanner/token.dart' show Token;
21 35
22 import 'frontend_accessors.dart' show Accessor; 36 import 'frontend_accessors.dart' show Accessor;
23 37
24 import 'package:front_end/src/fasta/type_inference/type_promotion.dart'
25 show TypePromoter;
26
27 import 'package:kernel/ast.dart'
28 hide InvalidExpression, InvalidInitializer, InvalidStatement;
29
30 import '../deprecated_problems.dart' show deprecated_internalProblem;
31
32 import '../scope.dart'
33 show deprecated_AccessErrorBuilder, ProblemBuilder, Scope;
34
35 import 'frontend_accessors.dart' as kernel 38 import 'frontend_accessors.dart' as kernel
36 show 39 show
37 IndexAccessor, 40 IndexAccessor,
38 NullAwarePropertyAccessor, 41 NullAwarePropertyAccessor,
39 PropertyAccessor, 42 PropertyAccessor,
40 ReadOnlyAccessor, 43 ReadOnlyAccessor,
41 StaticAccessor, 44 StaticAccessor,
42 SuperIndexAccessor, 45 SuperIndexAccessor,
43 SuperPropertyAccessor, 46 SuperPropertyAccessor,
44 ThisIndexAccessor, 47 ThisIndexAccessor,
45 ThisPropertyAccessor, 48 ThisPropertyAccessor,
46 VariableAccessor; 49 VariableAccessor;
47 50
48 import 'kernel_builder.dart' 51 import 'kernel_builder.dart'
49 show 52 show
50 Builder, 53 Builder,
51 KernelClassBuilder, 54 KernelClassBuilder,
52 KernelInvalidTypeBuilder, 55 KernelInvalidTypeBuilder,
53 LibraryBuilder, 56 LibraryBuilder,
54 PrefixBuilder, 57 PrefixBuilder,
55 TypeDeclarationBuilder; 58 TypeDeclarationBuilder;
56 59
57 import '../names.dart' show callName, lengthName;
58
59 abstract class BuilderHelper { 60 abstract class BuilderHelper {
60 LibraryBuilder get library; 61 LibraryBuilder get library;
61 62
62 Uri get uri; 63 Uri get uri;
63 64
64 TypePromoter get typePromoter; 65 TypePromoter get typePromoter;
65 66
66 int get functionNestingLevel; 67 int get functionNestingLevel;
67 68
68 bool get constantExpressionRequired; 69 bool get constantExpressionRequired;
69 70
70 Constructor lookupConstructor(Name name, {bool isSuper}); 71 Constructor lookupConstructor(Name name, {bool isSuper});
71 72
72 Expression toSuperMethodInvocation(MethodInvocation node); 73 Expression toSuperMethodInvocation(MethodInvocation node);
73 74
74 Expression toValue(node); 75 Expression toValue(node);
75 76
76 Member lookupSuperMember(Name name, {bool isSetter}); 77 Member lookupSuperMember(Name name, {bool isSetter});
77 78
78 scopeLookup(Scope scope, String name, Token token, 79 scopeLookup(Scope scope, String name, Token token,
79 {bool isQualified: false, PrefixBuilder prefix}); 80 {bool isQualified: false, PrefixBuilder prefix});
80 81
81 finishSend(Object receiver, Arguments arguments, int offset); 82 finishSend(Object receiver, Arguments arguments, int offset);
82 83
83 Expression deprecated_buildCompileTimeError(error, [int offset]); 84 Expression buildCompileTimeError(Message message, int charOffset);
85
86 Expression deprecated_buildCompileTimeError(String error, [int offset]);
84 87
85 Initializer buildInvalidInitializer(Expression expression, [int offset]); 88 Initializer buildInvalidInitializer(Expression expression, [int offset]);
86 89
87 Initializer buildFieldInitializer( 90 Initializer buildFieldInitializer(
88 String name, int offset, Expression expression); 91 String name, int offset, Expression expression);
89 92
90 Initializer buildSuperInitializer( 93 Initializer buildSuperInitializer(
91 Constructor constructor, Arguments arguments, 94 Constructor constructor, Arguments arguments,
92 [int offset]); 95 [int offset]);
93 96
(...skipping 950 matching lines...) Expand 10 before | Expand all | Expand 10 after
1044 offset ??= offsetForToken(this.token); 1047 offset ??= offsetForToken(this.token);
1045 return helper.throwNoSuchMethodError(new NullLiteral()..fileOffset = offset, 1048 return helper.throwNoSuchMethodError(new NullLiteral()..fileOffset = offset,
1046 plainNameForRead, arguments, offset, 1049 plainNameForRead, arguments, offset,
1047 isGetter: isGetter, isSetter: isSetter); 1050 isGetter: isGetter, isSetter: isSetter);
1048 } 1051 }
1049 } 1052 }
1050 1053
1051 bool isFieldOrGetter(Member member) { 1054 bool isFieldOrGetter(Member member) {
1052 return member is Field || (member is Procedure && member.isGetter); 1055 return member is Field || (member is Procedure && member.isGetter);
1053 } 1056 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/fasta/kernel/body_builder.dart ('k') | pkg/front_end/lib/src/fasta/kernel/kernel_class_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698