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

Unified Diff: pkg/front_end/lib/src/fasta/source/outline_builder.dart

Issue 2718113003: Run dartfmt on pkg/front_end/lib. (Closed)
Patch Set: Rerun after merging. Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: pkg/front_end/lib/src/fasta/source/outline_builder.dart
diff --git a/pkg/front_end/lib/src/fasta/source/outline_builder.dart b/pkg/front_end/lib/src/fasta/source/outline_builder.dart
index 76949d9049d065082701631a15d985f8931d1701..bd466f018442a715a27584b8d6df4ab5c86120f8 100644
--- a/pkg/front_end/lib/src/fasta/source/outline_builder.dart
+++ b/pkg/front_end/lib/src/fasta/source/outline_builder.dart
@@ -4,53 +4,34 @@
library fasta.outline_builder;
-import 'package:kernel/ast.dart' show
- AsyncMarker,
- ProcedureKind;
+import 'package:kernel/ast.dart' show AsyncMarker, ProcedureKind;
-import '../parser/parser.dart' show
- FormalParameterType,
- optional;
+import '../parser/parser.dart' show FormalParameterType, optional;
-import '../scanner/token.dart' show
- Token;
+import '../scanner/token.dart' show Token;
-import '../util/link.dart' show
- Link;
+import '../util/link.dart' show Link;
-import '../combinator.dart' show
- Combinator;
+import '../combinator.dart' show Combinator;
-import '../errors.dart' show
- internalError;
+import '../errors.dart' show internalError;
import '../builder/builder.dart';
-import '../modifier.dart' show
- Modifier;
+import '../modifier.dart' show Modifier;
-import 'source_library_builder.dart' show
- SourceLibraryBuilder;
+import 'source_library_builder.dart' show SourceLibraryBuilder;
-import 'unhandled_listener.dart' show
- NullValue,
- Unhandled,
- UnhandledListener;
+import 'unhandled_listener.dart' show NullValue, Unhandled, UnhandledListener;
-import '../parser/error_kind.dart' show
- ErrorKind;
+import '../parser/error_kind.dart' show ErrorKind;
-import '../parser/dart_vm_native.dart' show
- removeNativeClause,
- skipNativeClause;
+import '../parser/dart_vm_native.dart'
+ show removeNativeClause, skipNativeClause;
-import '../operator.dart' show
- Operator,
- operatorFromString,
- operatorToString;
+import '../operator.dart' show Operator, operatorFromString, operatorToString;
-import '../quote.dart' show
- unescapeString;
+import '../quote.dart' show unescapeString;
enum MethodBody {
Abstract,
@@ -66,7 +47,7 @@ AsyncMarker asyncMarkerFromTokens(Token asyncToken, Token starToken) {
assert(identical(starToken.stringValue, "*"));
return AsyncMarker.SyncStar;
}
- } else if (identical(asyncToken.stringValue, "async")) {
+ } else if (identical(asyncToken.stringValue, "async")) {
if (starToken == null) {
return AsyncMarker.Async;
} else {
@@ -100,15 +81,16 @@ class OutlineBuilder extends UnhandledListener {
List<TypeBuilder> typeArguments = pop();
if (arguments == null) {
String expression = pop();
- push(new MetadataBuilder.fromExpression(expression, postfix, library,
- beginToken.charOffset));
+ push(new MetadataBuilder.fromExpression(
+ expression, postfix, library, beginToken.charOffset));
} else {
String typeName = pop();
push(new MetadataBuilder.fromConstructor(
- library.addConstructorReference(
- typeName, typeArguments, postfix,
- beginToken.next.charOffset),
- arguments, library, beginToken.charOffset));
+ library.addConstructorReference(
+ typeName, typeArguments, postfix, beginToken.next.charOffset),
+ arguments,
+ library,
+ beginToken.charOffset));
}
}
@@ -153,8 +135,14 @@ class OutlineBuilder extends UnhandledListener {
Unhandled conditionalUris = pop();
String uri = pop();
List<MetadataBuilder> metadata = pop();
- library.addImport(metadata, uri, conditionalUris, prefix, combinators,
- deferredKeyword != null, importKeyword.charOffset,
+ library.addImport(
+ metadata,
+ uri,
+ conditionalUris,
+ prefix,
+ combinators,
+ deferredKeyword != null,
+ importKeyword.charOffset,
asKeyword?.next?.charOffset ?? -1);
checkEmpty(importKeyword.charOffset);
}
@@ -203,8 +191,12 @@ class OutlineBuilder extends UnhandledListener {
}
@override
- void endClassDeclaration(int interfacesCount, Token beginToken,
- Token classKeyword, Token extendsKeyword, Token implementsKeyword,
+ void endClassDeclaration(
+ int interfacesCount,
+ Token beginToken,
+ Token classKeyword,
+ Token extendsKeyword,
+ Token implementsKeyword,
Token endToken) {
debugEvent("endClassDeclaration");
List<TypeBuilder> interfaces = popList(interfacesCount);
@@ -235,8 +227,7 @@ class OutlineBuilder extends UnhandledListener {
}
@override
- void endTopLevelMethod(
- Token beginToken, Token getOrSet, Token endToken) {
+ void endTopLevelMethod(Token beginToken, Token getOrSet, Token endToken) {
debugEvent("endTopLevelMethod");
MethodBody kind = pop();
AsyncMarker asyncModifier = pop();
@@ -244,13 +235,22 @@ class OutlineBuilder extends UnhandledListener {
List<TypeVariableBuilder> typeVariables = pop();
String name = pop();
TypeBuilder returnType = pop();
- int modifiers = Modifier.validate(pop(),
- isAbstract: kind == MethodBody.Abstract);
+ int modifiers =
+ Modifier.validate(pop(), isAbstract: kind == MethodBody.Abstract);
List<MetadataBuilder> metadata = pop();
checkEmpty(beginToken.charOffset);
- library.addProcedure(metadata, modifiers, returnType, name,
- typeVariables, formals, asyncModifier, computeProcedureKind(getOrSet),
- beginToken.charOffset, nativeMethodName, isTopLevel: true);
+ library.addProcedure(
+ metadata,
+ modifiers,
+ returnType,
+ name,
+ typeVariables,
+ formals,
+ asyncModifier,
+ computeProcedureKind(getOrSet),
+ beginToken.charOffset,
+ nativeMethodName,
+ isTopLevel: true);
nativeMethodName = null;
}
@@ -296,8 +296,8 @@ class OutlineBuilder extends UnhandledListener {
kind = computeProcedureKind(getOrSet);
}
TypeBuilder returnType = pop();
- int modifiers = Modifier.validate(pop(),
- isAbstract: bodyKind == MethodBody.Abstract);
+ int modifiers =
+ Modifier.validate(pop(), isAbstract: bodyKind == MethodBody.Abstract);
List<MetadataBuilder> metadata = pop();
library.addProcedure(metadata, modifiers, returnType, name, typeVariables,
formals, asyncModifier, kind, beginToken.charOffset, nativeMethodName,
@@ -319,9 +319,8 @@ class OutlineBuilder extends UnhandledListener {
}
@override
- void endNamedMixinApplication(
- Token beginToken, Token classKeyword, Token equals,
- Token implementsKeyword, Token endToken) {
+ void endNamedMixinApplication(Token beginToken, Token classKeyword,
+ Token equals, Token implementsKeyword, Token endToken) {
debugEvent("endNamedMixinApplication");
List<TypeBuilder> interfaces = popIfNotNull(implementsKeyword);
TypeBuilder mixinApplication = pop();
@@ -333,9 +332,8 @@ class OutlineBuilder extends UnhandledListener {
}
int modifiers = Modifier.validate(pop());
List<MetadataBuilder> metadata = pop();
- library.addNamedMixinApplication(
- metadata, name, typeVariables, modifiers, mixinApplication, interfaces,
- beginToken.charOffset);
+ library.addNamedMixinApplication(metadata, name, typeVariables, modifiers,
+ mixinApplication, interfaces, beginToken.charOffset);
checkEmpty(beginToken.charOffset);
}
@@ -372,8 +370,8 @@ class OutlineBuilder extends UnhandledListener {
}
@override
- void endFormalParameter(Token covariantKeyword, Token thisKeyword,
- FormalParameterType kind) {
+ void endFormalParameter(
+ Token covariantKeyword, Token thisKeyword, FormalParameterType kind) {
debugEvent("FormalParameter");
String name = pop();
TypeBuilder type = pop();
@@ -381,7 +379,7 @@ class OutlineBuilder extends UnhandledListener {
List<MetadataBuilder> metadata = pop();
// TODO(ahe): Needs begin token.
push(library.addFormalParameter(metadata, modifiers, type, name,
- thisKeyword != null, thisKeyword?.charOffset ?? -1));
+ thisKeyword != null, thisKeyword?.charOffset ?? -1));
}
@override
@@ -397,8 +395,8 @@ class OutlineBuilder extends UnhandledListener {
}
@override
- void endFunctionTypedFormalParameter(Token covariantKeyword,
- Token thisKeyword, FormalParameterType kind) {
+ void endFunctionTypedFormalParameter(
+ Token covariantKeyword, Token thisKeyword, FormalParameterType kind) {
debugEvent("FunctionTypedFormalParameter");
pop(); // Function type parameters.
pop(); // Type variables.
@@ -413,7 +411,8 @@ class OutlineBuilder extends UnhandledListener {
int count, Token beginToken, Token endToken) {
debugEvent("OptionalFormalParameters");
FormalParameterType kind = optional("{", beginToken)
- ? FormalParameterType.NAMED : FormalParameterType.POSITIONAL;
+ ? FormalParameterType.NAMED
+ : FormalParameterType.POSITIONAL;
List parameters = popList(count);
for (FormalParameterBuilder parameter in parameters) {
parameter.kind = kind;
@@ -475,9 +474,8 @@ class OutlineBuilder extends UnhandledListener {
String name = pop();
TypeBuilder returnType = pop();
List<MetadataBuilder> metadata = pop();
- library.addFunctionTypeAlias(
- metadata, returnType, name, typeVariables, formals,
- typedefKeyword.charOffset);
+ library.addFunctionTypeAlias(metadata, returnType, name, typeVariables,
+ formals, typedefKeyword.charOffset);
checkEmpty(typedefKeyword.charOffset);
}
@@ -526,7 +524,7 @@ class OutlineBuilder extends UnhandledListener {
List<TypeBuilder> typeArguments = pop();
String name = pop();
push(library.addConstructorReference(
- name, typeArguments, suffix, start.charOffset));
+ name, typeArguments, suffix, start.charOffset));
}
@override
« no previous file with comments | « pkg/front_end/lib/src/fasta/source/diet_parser.dart ('k') | pkg/front_end/lib/src/fasta/source/scope_listener.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698