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

Unified Diff: pkg/front_end/lib/src/fasta/scanner.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
Index: pkg/front_end/lib/src/fasta/scanner.dart
diff --git a/pkg/front_end/lib/src/fasta/scanner.dart b/pkg/front_end/lib/src/fasta/scanner.dart
index cf5be615fe7f064570c16b006a3917bef80893e9..bc9550812b5bfcabfb4959c1e0299266fd423806 100644
--- a/pkg/front_end/lib/src/fasta/scanner.dart
+++ b/pkg/front_end/lib/src/fasta/scanner.dart
@@ -62,22 +62,28 @@ class ScannerResult {
/// Scan/tokenize the given UTF8 [bytes].
/// If [recover] is null, then the [defaultRecoveryStrategy] is used.
ScannerResult scan(List<int> bytes,
- {bool includeComments: false, Recover recover}) {
+ {bool includeComments: false,
+ bool scanGenericMethodComments: false,
+ Recover recover}) {
if (bytes.last != 0) {
throw new ArgumentError("[bytes]: the last byte must be null.");
}
- Scanner scanner =
- new Utf8BytesScanner(bytes, includeComments: includeComments);
+ Scanner scanner = new Utf8BytesScanner(bytes,
+ includeComments: includeComments,
+ scanGenericMethodComments: scanGenericMethodComments);
return _tokenizeAndRecover(scanner, recover, bytes: bytes);
}
/// Scan/tokenize the given [source].
/// If [recover] is null, then the [defaultRecoveryStrategy] is used.
ScannerResult scanString(String source,
- {bool includeComments: false, Recover recover}) {
+ {bool includeComments: false,
+ bool scanGenericMethodComments: false,
+ Recover recover}) {
assert(source != null, 'source must not be null');
- StringScanner scanner =
- new StringScanner(source, includeComments: includeComments);
+ StringScanner scanner = new StringScanner(source,
+ includeComments: includeComments,
+ scanGenericMethodComments: scanGenericMethodComments);
return _tokenizeAndRecover(scanner, recover, source: source);
}
« no previous file with comments | « pkg/analyzer/lib/src/dart/analysis/file_state.dart ('k') | pkg/front_end/lib/src/fasta/scanner/abstract_scanner.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698