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

Side by Side Diff: pkg/analyzer/lib/src/dart/analysis/file_state.dart

Issue 2914373002: Restore invariant that stack is empty in parseFunctionBody. (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/fasta/analyzer_diet_listener.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 4
5 import 'dart:async'; 5 import 'dart:async';
6 import 'dart:convert'; 6 import 'dart:convert';
7 import 'dart:typed_data'; 7 import 'dart:typed_data';
8 8
9 import 'package:analyzer/dart/ast/ast.dart'; 9 import 'package:analyzer/dart/ast/ast.dart';
10 import 'package:analyzer/dart/ast/token.dart'; 10 import 'package:analyzer/dart/ast/token.dart';
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 fasta.ScannerResult scanResult = fasta.scan(_contentBytes, 388 fasta.ScannerResult scanResult = fasta.scan(_contentBytes,
389 includeComments: true, 389 includeComments: true,
390 scanGenericMethodComments: analysisOptions.strongMode); 390 scanGenericMethodComments: analysisOptions.strongMode);
391 391
392 var astBuilder = new fasta.AstBuilder( 392 var astBuilder = new fasta.AstBuilder(
393 new ErrorReporter(errorListener, source), 393 new ErrorReporter(errorListener, source),
394 null, 394 null,
395 null, 395 null,
396 new _FastaElementStoreProxy(), 396 new _FastaElementStoreProxy(),
397 new fasta.Scope.top(isModifiable: true), 397 new fasta.Scope.top(isModifiable: true),
398 true,
398 uri); 399 uri);
399 astBuilder.parseGenericMethodComments = analysisOptions.strongMode; 400 astBuilder.parseGenericMethodComments = analysisOptions.strongMode;
400 401
401 var parser = new fasta.Parser(astBuilder); 402 var parser = new fasta.Parser(astBuilder);
402 astBuilder.parser = parser; 403 astBuilder.parser = parser;
403 parser.parseUnit(scanResult.tokens); 404 parser.parseUnit(scanResult.tokens);
404 var unit = astBuilder.pop() as CompilationUnit; 405 var unit = astBuilder.pop() as CompilationUnit;
405 406
406 LineInfo lineInfo = new LineInfo(scanResult.lineStarts); 407 LineInfo lineInfo = new LineInfo(scanResult.lineStarts);
407 unit.lineInfo = lineInfo; 408 unit.lineInfo = lineInfo;
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after
931 _FastaElementProxy operator [](fasta.Builder builder) => 932 _FastaElementProxy operator [](fasta.Builder builder) =>
932 _elements.putIfAbsent(builder, () => new _FastaElementProxy()); 933 _elements.putIfAbsent(builder, () => new _FastaElementProxy());
933 934
934 @override 935 @override
935 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); 936 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
936 } 937 }
937 938
938 class _FastaInterfaceTypeProxy implements fasta.KernelInterfaceType { 939 class _FastaInterfaceTypeProxy implements fasta.KernelInterfaceType {
939 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); 940 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
940 } 941 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/fasta/analyzer_diet_listener.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698