| OLD | NEW |
| 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.procedure_builder; | 5 library fasta.procedure_builder; |
| 6 | 6 |
| 7 // Note: we're deliberately using AsyncMarker and ProcedureKind from kernel | 7 // Note: we're deliberately using AsyncMarker and ProcedureKind from kernel |
| 8 // outside the kernel-specific builders. This is simpler than creating | 8 // outside the kernel-specific builders. This is simpler than creating |
| 9 // additional enums. | 9 // additional enums. |
| 10 import 'package:kernel/ast.dart' show AsyncMarker, ProcedureKind; | 10 import 'package:kernel/ast.dart' show AsyncMarker, ProcedureKind; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 | 27 |
| 28 final T returnType; | 28 final T returnType; |
| 29 | 29 |
| 30 final String name; | 30 final String name; |
| 31 | 31 |
| 32 final List<TypeVariableBuilder> typeVariables; | 32 final List<TypeVariableBuilder> typeVariables; |
| 33 | 33 |
| 34 final List<FormalParameterBuilder> formals; | 34 final List<FormalParameterBuilder> formals; |
| 35 | 35 |
| 36 ProcedureBuilder( | 36 ProcedureBuilder( |
| 37 String documentationComment, | |
| 38 this.metadata, | 37 this.metadata, |
| 39 this.modifiers, | 38 this.modifiers, |
| 40 this.returnType, | 39 this.returnType, |
| 41 this.name, | 40 this.name, |
| 42 this.typeVariables, | 41 this.typeVariables, |
| 43 this.formals, | 42 this.formals, |
| 44 LibraryBuilder compilationUnit, | 43 LibraryBuilder compilationUnit, |
| 45 int charOffset) | 44 int charOffset) |
| 46 : super(compilationUnit, charOffset, documentationComment); | 45 : super(compilationUnit, charOffset); |
| 47 | 46 |
| 48 String get debugName => "ProcedureBuilder"; | 47 String get debugName => "ProcedureBuilder"; |
| 49 | 48 |
| 50 AsyncMarker get asyncModifier; | 49 AsyncMarker get asyncModifier; |
| 51 | 50 |
| 52 ProcedureKind get kind; | 51 ProcedureKind get kind; |
| 53 | 52 |
| 54 bool get isConstructor => false; | 53 bool get isConstructor => false; |
| 55 | 54 |
| 56 bool get isRegularMethod => identical(ProcedureKind.Method, kind); | 55 bool get isRegularMethod => identical(ProcedureKind.Method, kind); |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 return new Scope(local, null, parent, isModifiable: false); | 113 return new Scope(local, null, parent, isModifiable: false); |
| 115 } | 114 } |
| 116 | 115 |
| 117 FormalParameterBuilder getFormal(String name) { | 116 FormalParameterBuilder getFormal(String name) { |
| 118 for (FormalParameterBuilder formal in formals) { | 117 for (FormalParameterBuilder formal in formals) { |
| 119 if (formal.name == name) return formal; | 118 if (formal.name == name) return formal; |
| 120 } | 119 } |
| 121 return null; | 120 return null; |
| 122 } | 121 } |
| 123 } | 122 } |
| OLD | NEW |