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

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

Issue 2978063002: Move parser helper classes to own files and clean them up. (Closed)
Patch Set: Don't use problems.dart in parser. Created 3 years, 5 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 c90b48bf96d77e8ae480907fcaffae3e5fc56292..e5e8f2552afd1dcaf943c23557711ff399fc4a7d 100644
--- a/pkg/front_end/lib/src/fasta/source/outline_builder.dart
+++ b/pkg/front_end/lib/src/fasta/source/outline_builder.dart
@@ -31,12 +31,11 @@ import '../operator.dart'
operatorToString,
operatorRequiredArgumentCount;
-import '../parser/identifier_context.dart' show IdentifierContext;
-
import '../parser/native_support.dart'
show extractNativeMethodName, removeNativeClause, skipNativeClause;
-import '../parser/parser.dart' show FormalParameterType, MemberKind, optional;
+import '../parser.dart'
+ show FormalParameterKind, IdentifierContext, MemberKind, optional;
import '../problems.dart' show unhandled, unimplemented;
@@ -495,7 +494,7 @@ class OutlineBuilder extends UnhandledListener {
@override
void endFormalParameter(Token thisKeyword, Token nameToken,
- FormalParameterType kind, MemberKind memberKind) {
+ FormalParameterKind kind, MemberKind memberKind) {
debugEvent("FormalParameter");
int charOffset = pop();
String name = pop();
@@ -522,9 +521,9 @@ class OutlineBuilder extends UnhandledListener {
void endOptionalFormalParameters(
int count, Token beginToken, Token endToken) {
debugEvent("OptionalFormalParameters");
- FormalParameterType kind = optional("{", beginToken)
- ? FormalParameterType.NAMED
- : FormalParameterType.POSITIONAL;
+ FormalParameterKind kind = optional("{", beginToken)
+ ? FormalParameterKind.optionalNamed
+ : FormalParameterKind.optionalPositional;
// When recovering from an empty list of optional arguments, count may be
// 0. It might be simpler if the parser didn't call this method in that
// case, however, then [beginOptionalFormalParameters] wouldn't always be
« no previous file with comments | « pkg/front_end/lib/src/fasta/source/diet_parser.dart ('k') | pkg/front_end/lib/src/incremental/unlinked_unit.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698