| 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 #ifndef INCLUDE_DART_DEBUGGER_API_H_ | 5 #ifndef INCLUDE_DART_DEBUGGER_API_H_ |
| 6 #define INCLUDE_DART_DEBUGGER_API_H_ | 6 #define INCLUDE_DART_DEBUGGER_API_H_ |
| 7 | 7 |
| 8 #include "include/dart_api.h" | 8 #include "include/dart_api.h" |
| 9 | 9 |
| 10 typedef struct _Dart_Breakpoint* Dart_Breakpoint; | 10 typedef struct _Dart_Breakpoint* Dart_Breakpoint; |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 * | 135 * |
| 136 * \return A handle to string containing the source text if no error | 136 * \return A handle to string containing the source text if no error |
| 137 * occurs. | 137 * occurs. |
| 138 */ | 138 */ |
| 139 DART_EXPORT Dart_Handle Dart_ScriptGetSource( | 139 DART_EXPORT Dart_Handle Dart_ScriptGetSource( |
| 140 intptr_t library_id, | 140 intptr_t library_id, |
| 141 Dart_Handle script_url_in); | 141 Dart_Handle script_url_in); |
| 142 | 142 |
| 143 | 143 |
| 144 /** | 144 /** |
| 145 * Returns an array containing line number and token offset info |
| 146 * for the given script. |
| 147 * |
| 148 * Returns an array of numbers. Null values indicate the beginning of |
| 149 * a new line. The first number after null is the line number. |
| 150 * The line number is followed by pairs of numbers, with the first value |
| 151 * being the "token offset" and the second value being the character offset |
| 152 * of the token relative to the beginning of the script. |
| 153 * The "token offset" is a value that is used to indicate a location |
| 154 * in code, similarly to a "PC" address. |
| 155 * Source lines with no tokens are omitted. |
| 156 * |
| 157 * Requires there to be a current isolate. |
| 158 * |
| 159 * \return A handle to an array or an error object. |
| 160 */ |
| 161 DART_EXPORT Dart_Handle Dart_ScriptGetTokenInfo( |
| 162 intptr_t library_id, |
| 163 Dart_Handle script_url_in); |
| 164 |
| 165 |
| 166 /** |
| 145 * Returns a string containing a generated source code of the given script | 167 * Returns a string containing a generated source code of the given script |
| 146 * in the given library. This is essentially used to pretty print dart code | 168 * in the given library. This is essentially used to pretty print dart code |
| 147 * generated from any tool (e.g: dart2dart). | 169 * generated from any tool (e.g: dart2dart). |
| 148 * | 170 * |
| 149 * Requires there to be a current isolate. | 171 * Requires there to be a current isolate. |
| 150 * | 172 * |
| 151 * \return A handle to string containing the source text if no error | 173 * \return A handle to string containing the source text if no error |
| 152 * occurs. | 174 * occurs. |
| 153 */ | 175 */ |
| 154 DART_EXPORT Dart_Handle Dart_GenerateScriptSource(Dart_Handle library_url_in, | 176 DART_EXPORT Dart_Handle Dart_GenerateScriptSource(Dart_Handle library_url_in, |
| (...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 617 * \param request A REST-like string, which uses '/' to separate | 639 * \param request A REST-like string, which uses '/' to separate |
| 618 * parameters. The first parameter is always the status type. | 640 * parameters. The first parameter is always the status type. |
| 619 * | 641 * |
| 620 * \return The requested status as a JSON formatted string, with the | 642 * \return The requested status as a JSON formatted string, with the |
| 621 * contents defined by the status plug-in. The caller is responsible | 643 * contents defined by the status plug-in. The caller is responsible |
| 622 * for freeing this string. | 644 * for freeing this string. |
| 623 */ | 645 */ |
| 624 DART_EXPORT char* Dart_GetVmStatus(const char* request); | 646 DART_EXPORT char* Dart_GetVmStatus(const char* request); |
| 625 | 647 |
| 626 #endif // INCLUDE_DART_DEBUGGER_API_H_ | 648 #endif // INCLUDE_DART_DEBUGGER_API_H_ |
| OLD | NEW |