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

Unified Diff: pkg/compiler/lib/src/scanner/scanner_task.dart

Issue 1971193002: Patches to support Dart VM patch files in dart2js. (Closed) Base URL: sso://user/ahe/dart-sdk@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/resolution/type_resolver.dart ('k') | pkg/compiler/lib/src/tokens/keyword.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/scanner/scanner_task.dart
diff --git a/pkg/compiler/lib/src/scanner/scanner_task.dart b/pkg/compiler/lib/src/scanner/scanner_task.dart
index 3d694a3d7110d4762f94b5764be74e85461665d2..b3c158bc6681ba62b08c87d396dc21830cf31899 100644
--- a/pkg/compiler/lib/src/scanner/scanner_task.dart
+++ b/pkg/compiler/lib/src/scanner/scanner_task.dart
@@ -76,6 +76,17 @@ class ScannerTask extends CompilerTask {
});
}
+ Token tokenizeUnit(CompilationUnitElement unit) {
+ return measureElement(unit, () {
+ Token tokens = new Scanner(
+ unit.script.file, includeComments: _preserveComments).tokenize();
+ if (_preserveComments) {
+ tokens = processAndStripComments(tokens);
+ }
+ return tokens;
+ });
+ }
+
Token processAndStripComments(Token currentToken) {
Token firstToken = currentToken;
Token prevToken;
« no previous file with comments | « pkg/compiler/lib/src/resolution/type_resolver.dart ('k') | pkg/compiler/lib/src/tokens/keyword.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698