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

Side by Side Diff: pkg/kernel/lib/clone.dart

Issue 2820323005: Run formatter on a few frontend and kernel files that hadn't been formatted. (Closed)
Patch Set: Run formatter on a few frontend and kernel files that hadn't been formatted. 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/kernel/lib/class_hierarchy.dart ('k') | pkg/kernel/lib/frontend/accessors.dart » ('j') | 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) 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 library kernel.clone; 4 library kernel.clone;
5 5
6 import 'ast.dart'; 6 import 'ast.dart';
7 import 'type_algebra.dart'; 7 import 'type_algebra.dart';
8 8
9 /// Visitor that return a clone of a tree, maintaining references to cloned 9 /// Visitor that return a clone of a tree, maintaining references to cloned
10 /// objects. 10 /// objects.
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 ..fileEndOffset = node.fileEndOffset; 353 ..fileEndOffset = node.fileEndOffset;
354 } 354 }
355 355
356 visitProcedure(Procedure node) { 356 visitProcedure(Procedure node) {
357 return new Procedure(node.name, node.kind, clone(node.function), 357 return new Procedure(node.name, node.kind, clone(node.function),
358 isAbstract: node.isAbstract, 358 isAbstract: node.isAbstract,
359 isStatic: node.isStatic, 359 isStatic: node.isStatic,
360 isExternal: node.isExternal, 360 isExternal: node.isExternal,
361 isConst: node.isConst, 361 isConst: node.isConst,
362 transformerFlags: node.transformerFlags, 362 transformerFlags: node.transformerFlags,
363 fileUri: node.fileUri)..fileEndOffset = node.fileEndOffset; 363 fileUri: node.fileUri)
364 ..fileEndOffset = node.fileEndOffset;
364 } 365 }
365 366
366 visitField(Field node) { 367 visitField(Field node) {
367 return new Field(node.name, 368 return new Field(node.name,
368 type: visitType(node.type), 369 type: visitType(node.type),
369 initializer: cloneOptional(node.initializer), 370 initializer: cloneOptional(node.initializer),
370 isFinal: node.isFinal, 371 isFinal: node.isFinal,
371 isConst: node.isConst, 372 isConst: node.isConst,
372 isStatic: node.isStatic, 373 isStatic: node.isStatic,
373 hasImplicitGetter: node.hasImplicitGetter, 374 hasImplicitGetter: node.hasImplicitGetter,
374 hasImplicitSetter: node.hasImplicitSetter, 375 hasImplicitSetter: node.hasImplicitSetter,
375 transformerFlags: node.transformerFlags, 376 transformerFlags: node.transformerFlags,
376 fileUri: node.fileUri)..fileEndOffset = node.fileEndOffset; 377 fileUri: node.fileUri)
378 ..fileEndOffset = node.fileEndOffset;
377 } 379 }
378 380
379 visitTypeParameter(TypeParameter node) { 381 visitTypeParameter(TypeParameter node) {
380 var newNode = new TypeParameter(node.name); 382 var newNode = new TypeParameter(node.name);
381 typeSubstitution[node] = new TypeParameterType(newNode); 383 typeSubstitution[node] = new TypeParameterType(newNode);
382 newNode.bound = visitType(node.bound); 384 newNode.bound = visitType(node.bound);
383 return newNode; 385 return newNode;
384 } 386 }
385 387
386 TreeNode cloneFunctionNodeBody(FunctionNode node) => cloneOptional(node.body); 388 TreeNode cloneFunctionNodeBody(FunctionNode node) => cloneOptional(node.body);
(...skipping 16 matching lines...) Expand all
403 visitArguments(Arguments node) { 405 visitArguments(Arguments node) {
404 return new Arguments(node.positional.map(clone).toList(), 406 return new Arguments(node.positional.map(clone).toList(),
405 types: node.types.map(visitType).toList(), 407 types: node.types.map(visitType).toList(),
406 named: node.named.map(clone).toList()); 408 named: node.named.map(clone).toList());
407 } 409 }
408 410
409 visitNamedExpression(NamedExpression node) { 411 visitNamedExpression(NamedExpression node) {
410 return new NamedExpression(node.name, clone(node.value)); 412 return new NamedExpression(node.name, clone(node.value));
411 } 413 }
412 } 414 }
OLDNEW
« no previous file with comments | « pkg/kernel/lib/class_hierarchy.dart ('k') | pkg/kernel/lib/frontend/accessors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698