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

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

Issue 2930673002: Implement initializer asserts. (Closed)
Patch Set: Address comments and tweak error recovery. Created 3 years, 6 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
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 4
5 library fasta.outline_builder; 5 library fasta.outline_builder;
6 6
7 import 'package:kernel/ast.dart' show ProcedureKind; 7 import 'package:kernel/ast.dart' show ProcedureKind;
8 8
9 import '../fasta_codes.dart' show FastaMessage, codeExpectedBlockToSkip; 9 import '../fasta_codes.dart' show FastaMessage, codeExpectedBlockToSkip;
10 10
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 String uri = pop(); 143 String uri = pop();
144 List<MetadataBuilder> metadata = pop(); 144 List<MetadataBuilder> metadata = pop();
145 if (uri != null) { 145 if (uri != null) {
146 library.addImport(metadata, uri, conditionalUris, prefix, combinators, 146 library.addImport(metadata, uri, conditionalUris, prefix, combinators,
147 deferredKeyword != null, importKeyword.charOffset, prefixOffset); 147 deferredKeyword != null, importKeyword.charOffset, prefixOffset);
148 } 148 }
149 checkEmpty(importKeyword.charOffset); 149 checkEmpty(importKeyword.charOffset);
150 } 150 }
151 151
152 @override 152 @override
153 void handleRecoverExpression(Token token) { 153 void handleRecoverExpression(Token token, FastaMessage message) {
154 debugEvent("RecoverExpression"); 154 debugEvent("RecoverExpression");
155 push(NullValue.Expression); 155 push(NullValue.Expression);
156 push(token.charOffset); 156 push(token.charOffset);
157 } 157 }
158 158
159 @override 159 @override
160 void endPart(Token partKeyword, Token semicolon) { 160 void endPart(Token partKeyword, Token semicolon) {
161 debugEvent("Part"); 161 debugEvent("Part");
162 int charOffset = popCharOffset(); 162 int charOffset = popCharOffset();
163 String uri = pop(); 163 String uri = pop();
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 Link<Token> handleMemberName(Link<Token> identifiers) { 810 Link<Token> handleMemberName(Link<Token> identifiers) {
811 if (!enableNative || identifiers.isEmpty) return identifiers; 811 if (!enableNative || identifiers.isEmpty) return identifiers;
812 return removeNativeClause(identifiers); 812 return removeNativeClause(identifiers);
813 } 813 }
814 814
815 @override 815 @override
816 void debugEvent(String name) { 816 void debugEvent(String name) {
817 // printEvent(name); 817 // printEvent(name);
818 } 818 }
819 } 819 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/fasta/parser/parser.dart ('k') | pkg/front_end/lib/src/fasta/source/stack_listener.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698