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

Side by Side Diff: pkg/compiler/lib/src/scanner/scanner_task.dart

Issue 1225273002: Remove flag for enabling null-aware operators. They are now on by default. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 part of scanner; 5 part of scanner;
6 6
7 class ScannerTask extends CompilerTask { 7 class ScannerTask extends CompilerTask {
8 ScannerTask(Compiler compiler) : super(compiler); 8 ScannerTask(Compiler compiler) : super(compiler);
9 String get name => 'Scanner'; 9 String get name => 'Scanner';
10 10
(...skipping 11 matching lines...) Expand all
22 22
23 void scan(CompilationUnitElement compilationUnit) { 23 void scan(CompilationUnitElement compilationUnit) {
24 measure(() { 24 measure(() {
25 scanElements(compilationUnit); 25 scanElements(compilationUnit);
26 }); 26 });
27 } 27 }
28 28
29 void scanElements(CompilationUnitElement compilationUnit) { 29 void scanElements(CompilationUnitElement compilationUnit) {
30 Script script = compilationUnit.script; 30 Script script = compilationUnit.script;
31 Token tokens = new Scanner(script.file, 31 Token tokens = new Scanner(script.file,
32 includeComments: compiler.preserveComments, 32 includeComments: compiler.preserveComments).tokenize();
33 enableNullAwareOperators: compiler.enableNullAwareOperators).tokenize();
34 if (compiler.preserveComments) { 33 if (compiler.preserveComments) {
35 tokens = compiler.processAndStripComments(tokens); 34 tokens = compiler.processAndStripComments(tokens);
36 } 35 }
37 compiler.dietParser.dietParse(compilationUnit, tokens); 36 compiler.dietParser.dietParse(compilationUnit, tokens);
38 } 37 }
39 38
40 /** 39 /**
41 * Returns the tokens for the [source]. 40 * Returns the tokens for the [source].
42 * 41 *
43 * The [StringScanner] implementation works on strings that end with a '0' 42 * The [StringScanner] implementation works on strings that end with a '0'
(...skipping 19 matching lines...) Expand all
63 new ElementListener(compiler, compilationUnit, idGenerator); 62 new ElementListener(compiler, compilationUnit, idGenerator);
64 PartialParser parser = new PartialParser(listener); 63 PartialParser parser = new PartialParser(listener);
65 try { 64 try {
66 parser.parseUnit(tokens); 65 parser.parseUnit(tokens);
67 } on ParserError catch(_) { 66 } on ParserError catch(_) {
68 assert(invariant(compilationUnit, compiler.compilationFailed)); 67 assert(invariant(compilationUnit, compiler.compilationFailed));
69 } 68 }
70 }); 69 });
71 } 70 }
72 } 71 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/scanner/scanner.dart ('k') | pkg/compiler/lib/src/scanner/string_scanner.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698