| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |