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

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

Issue 2829113002: Make AstFactory.variableDeclaration(charOffset) a required parameter. (Closed)
Patch Set: 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
« no previous file with comments | « pkg/front_end/lib/src/fasta/kernel/body_builder.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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:kernel/ast.dart'; 5 import 'package:kernel/ast.dart';
6 6
7 import '../builder/ast_factory.dart'; 7 import '../builder/ast_factory.dart';
8 import 'kernel_shadow_ast.dart'; 8 import 'kernel_shadow_ast.dart';
9 9
10 /// Concrete implementation of [builder.AstFactory] for building a kernel AST. 10 /// Concrete implementation of [builder.AstFactory] for building a kernel AST.
(...skipping 20 matching lines...) Expand all
31 KernelNullLiteral nullLiteral(int charOffset) { 31 KernelNullLiteral nullLiteral(int charOffset) {
32 return new KernelNullLiteral()..fileOffset = charOffset; 32 return new KernelNullLiteral()..fileOffset = charOffset;
33 } 33 }
34 34
35 @override 35 @override
36 KernelReturnStatement returnStatement(Expression expression, int charOffset) { 36 KernelReturnStatement returnStatement(Expression expression, int charOffset) {
37 return new KernelReturnStatement(expression)..fileOffset = charOffset; 37 return new KernelReturnStatement(expression)..fileOffset = charOffset;
38 } 38 }
39 39
40 @override 40 @override
41 KernelVariableDeclaration variableDeclaration(String name, 41 KernelVariableDeclaration variableDeclaration(String name, int charOffset,
42 {DartType type, 42 {DartType type,
43 Expression initializer, 43 Expression initializer,
44 int charOffset = TreeNode.noOffset,
45 int equalsCharOffset = TreeNode.noOffset, 44 int equalsCharOffset = TreeNode.noOffset,
46 bool isFinal: false, 45 bool isFinal: false,
47 bool isConst: false}) { 46 bool isConst: false}) {
48 return new KernelVariableDeclaration(name, 47 return new KernelVariableDeclaration(name,
49 type: type, 48 type: type,
50 initializer: initializer, 49 initializer: initializer,
51 isFinal: isFinal, 50 isFinal: isFinal,
52 isConst: isConst) 51 isConst: isConst)
53 ..fileOffset = charOffset 52 ..fileOffset = charOffset
54 ..fileEqualsOffset = equalsCharOffset; 53 ..fileEqualsOffset = equalsCharOffset;
55 } 54 }
56 } 55 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/fasta/kernel/body_builder.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698