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 /** | 5 /** |
6 * To use it, from this directory, run: | 6 * To use it, from this directory, run: |
7 * | 7 * |
8 * $ ./dartdoc <path to .dart file> | 8 * $ ./dartdoc <path to .dart file> |
9 * | 9 * |
10 * This will create a "docs" directory with the docs for your libraries. To | 10 * This will create a "docs" directory with the docs for your libraries. To |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 var oldDietParse = options.dietParse; | 179 var oldDietParse = options.dietParse; |
180 try { | 180 try { |
181 options.dietParse = true; | 181 options.dietParse = true; |
182 | 182 |
183 // Handle the built-in entrypoints. | 183 // Handle the built-in entrypoints. |
184 switch (entrypoint) { | 184 switch (entrypoint) { |
185 case 'corelib': | 185 case 'corelib': |
186 world.getOrAddLibrary('dart:core'); | 186 world.getOrAddLibrary('dart:core'); |
187 world.getOrAddLibrary('dart:coreimpl'); | 187 world.getOrAddLibrary('dart:coreimpl'); |
188 world.getOrAddLibrary('dart:json'); | 188 world.getOrAddLibrary('dart:json'); |
| 189 world.getOrAddLibrary('dart:isolate'); |
189 world.process(); | 190 world.process(); |
190 break; | 191 break; |
191 | 192 |
192 case 'dom': | 193 case 'dom': |
193 world.getOrAddLibrary('dart:core'); | 194 world.getOrAddLibrary('dart:core'); |
194 world.getOrAddLibrary('dart:coreimpl'); | 195 world.getOrAddLibrary('dart:coreimpl'); |
195 world.getOrAddLibrary('dart:json'); | 196 world.getOrAddLibrary('dart:json'); |
196 world.getOrAddLibrary('dart:dom'); | 197 world.getOrAddLibrary('dart:dom'); |
| 198 world.getOrAddLibrary('dart:isolate'); |
197 world.process(); | 199 world.process(); |
198 break; | 200 break; |
199 | 201 |
200 case 'html': | 202 case 'html': |
201 world.getOrAddLibrary('dart:core'); | 203 world.getOrAddLibrary('dart:core'); |
202 world.getOrAddLibrary('dart:coreimpl'); | 204 world.getOrAddLibrary('dart:coreimpl'); |
203 world.getOrAddLibrary('dart:json'); | 205 world.getOrAddLibrary('dart:json'); |
204 world.getOrAddLibrary('dart:dom'); | 206 world.getOrAddLibrary('dart:dom'); |
205 world.getOrAddLibrary('dart:html'); | 207 world.getOrAddLibrary('dart:html'); |
| 208 world.getOrAddLibrary('dart:isolate'); |
206 world.process(); | 209 world.process(); |
207 break; | 210 break; |
208 | 211 |
209 default: | 212 default: |
210 // Normal entrypoint script. | 213 // Normal entrypoint script. |
211 world.processDartScript(entrypoint); | 214 world.processDartScript(entrypoint); |
212 } | 215 } |
213 | 216 |
214 world.resolveAll(); | 217 world.resolveAll(); |
215 | 218 |
(...skipping 985 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1201 | 1204 |
1202 return new md.Element.text('code', name); | 1205 return new md.Element.text('code', name); |
1203 } | 1206 } |
1204 | 1207 |
1205 // TODO(rnystrom): Move into SourceSpan? | 1208 // TODO(rnystrom): Move into SourceSpan? |
1206 int getSpanColumn(SourceSpan span) { | 1209 int getSpanColumn(SourceSpan span) { |
1207 final line = span.file.getLine(span.start); | 1210 final line = span.file.getLine(span.start); |
1208 return span.file.getColumn(line, span.start); | 1211 return span.file.getColumn(line, span.start); |
1209 } | 1212 } |
1210 } | 1213 } |
OLD | NEW |