| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 package com.google.dart.compiler.parser; | 5 package com.google.dart.compiler.parser; |
| 6 | 6 |
| 7 import com.google.dart.compiler.CompilerTestCase; | 7 import com.google.dart.compiler.CompilerTestCase; |
| 8 import com.google.dart.compiler.ast.DartDirective; | 8 import com.google.dart.compiler.ast.DartDirective; |
| 9 import com.google.dart.compiler.ast.DartImportDirective; | 9 import com.google.dart.compiler.ast.DartImportDirective; |
| 10 import com.google.dart.compiler.ast.DartLibraryDirective; | 10 import com.google.dart.compiler.ast.DartLibraryDirective; |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 } | 151 } |
| 152 String megaSource = out.toString(); | 152 String megaSource = out.toString(); |
| 153 long start = System.currentTimeMillis(); | 153 long start = System.currentTimeMillis(); |
| 154 parseUnit("Mega.dart", megaSource); | 154 parseUnit("Mega.dart", megaSource); |
| 155 System.out.format("%s ms for '%s.%s()'%n", System.currentTimeMillis() - star
t, | 155 System.out.format("%s ms for '%s.%s()'%n", System.currentTimeMillis() - star
t, |
| 156 getClass().getName(), getName()); | 156 getClass().getName(), getName()); |
| 157 } | 157 } |
| 158 | 158 |
| 159 @Override | 159 @Override |
| 160 protected DartParser makeParser(ParserContext context) { | 160 protected DartParser makeParser(ParserContext context) { |
| 161 Set<String> set = new HashSet<String>(); | 161 Set<String> prefixes = new HashSet<String>(); |
| 162 set.add("prefix"); | 162 prefixes.add("prefix"); |
| 163 return new DartParser(context, set); | 163 return new DartParser(context, prefixes, false); |
| 164 } | 164 } |
| 165 } | 165 } |
| OLD | NEW |