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

Unified Diff: pkg/analyzer/lib/src/dart/analysis/file_state.dart

Issue 2850853004: Add 'scanGenericMethodComments' parameter to constructors and scan() functions. (Closed)
Patch Set: Parse generic method comments only in strong mode. Created 3 years, 8 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
« no previous file with comments | « no previous file | pkg/front_end/lib/src/fasta/scanner.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/dart/analysis/file_state.dart
diff --git a/pkg/analyzer/lib/src/dart/analysis/file_state.dart b/pkg/analyzer/lib/src/dart/analysis/file_state.dart
index 44100e268ddd5eb1d4a7d8ef0bbcb1e7eb0a551c..32adf127900b7f0200707f0cb742bd3419b9ebef 100644
--- a/pkg/analyzer/lib/src/dart/analysis/file_state.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/file_state.dart
@@ -380,8 +380,9 @@ class FileState {
if (USE_FASTA_PARSER) {
try {
- fasta.ScannerResult scanResult =
- fasta.scan(_contentBytes, includeComments: true);
+ fasta.ScannerResult scanResult = fasta.scan(_contentBytes,
+ includeComments: true,
+ scanGenericMethodComments: analysisOptions.strongMode);
var astBuilder = new fasta.AstBuilder(
new ErrorReporter(errorListener, source),
@@ -390,6 +391,8 @@ class FileState {
new _FastaElementStoreProxy(),
new fasta.Scope.top(isModifiable: true),
uri);
+ astBuilder.parseGenericMethodComments = analysisOptions.strongMode;
+
var parser = new fasta.Parser(astBuilder);
astBuilder.parser = parser;
parser.parseUnit(scanResult.tokens);
« no previous file with comments | « no previous file | pkg/front_end/lib/src/fasta/scanner.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698