| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 * This file is an "idl" style description of the summary format. It is not | 6 * This file is an "idl" style description of the summary format. It is not |
| 7 * executed directly; instead it is parsed and transformed into code that | 7 * executed directly; instead it is parsed and transformed into code that |
| 8 * implements the summary format. | 8 * implements the summary format. |
| 9 * | 9 * |
| 10 * The code generation process introduces the following non-typical semantics: | 10 * The code generation process introduces the following non-typical semantics: |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 */ | 215 */ |
| 216 String name; | 216 String name; |
| 217 | 217 |
| 218 /** | 218 /** |
| 219 * Offset of the class name relative to the beginning of the file. | 219 * Offset of the class name relative to the beginning of the file. |
| 220 */ | 220 */ |
| 221 @informative | 221 @informative |
| 222 int nameOffset; | 222 int nameOffset; |
| 223 | 223 |
| 224 /** | 224 /** |
| 225 * Documentation comment for the class, or `null` if there is no |
| 226 * documentation comment. |
| 227 */ |
| 228 @informative |
| 229 UnlinkedDocumentationComment documentationComment; |
| 230 |
| 231 /** |
| 225 * Type parameters of the class, if any. | 232 * Type parameters of the class, if any. |
| 226 */ | 233 */ |
| 227 List<UnlinkedTypeParam> typeParameters; | 234 List<UnlinkedTypeParam> typeParameters; |
| 228 | 235 |
| 229 /** | 236 /** |
| 230 * Supertype of the class, or `null` if either (a) the class doesn't | 237 * Supertype of the class, or `null` if either (a) the class doesn't |
| 231 * explicitly declare a supertype (and hence has supertype `Object`), or (b) | 238 * explicitly declare a supertype (and hence has supertype `Object`), or (b) |
| 232 * the class *is* `Object` (and hence has no supertype). | 239 * the class *is* `Object` (and hence has no supertype). |
| 233 */ | 240 */ |
| 234 UnlinkedTypeRef supertype; | 241 UnlinkedTypeRef supertype; |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 */ | 287 */ |
| 281 List<String> shows; | 288 List<String> shows; |
| 282 | 289 |
| 283 /** | 290 /** |
| 284 * List of names which are hidden. Empty if this is a `show` combinator. | 291 * List of names which are hidden. Empty if this is a `show` combinator. |
| 285 */ | 292 */ |
| 286 List<String> hides; | 293 List<String> hides; |
| 287 } | 294 } |
| 288 | 295 |
| 289 /** | 296 /** |
| 297 * Unlinked summary information about a documentation comment. |
| 298 */ |
| 299 class UnlinkedDocumentationComment { |
| 300 /** |
| 301 * Text of the documentation comment, with '\r\n' replaced by '\n'. |
| 302 * |
| 303 * References appearing within the doc comment in square brackets are not |
| 304 * specially encoded. |
| 305 */ |
| 306 String text; |
| 307 } |
| 308 |
| 309 /** |
| 290 * Unlinked summary information about an enum declaration. | 310 * Unlinked summary information about an enum declaration. |
| 291 */ | 311 */ |
| 292 class UnlinkedEnum { | 312 class UnlinkedEnum { |
| 293 /** | 313 /** |
| 294 * Name of the enum type. | 314 * Name of the enum type. |
| 295 */ | 315 */ |
| 296 String name; | 316 String name; |
| 297 | 317 |
| 298 /** | 318 /** |
| 299 * Offset of the enum name relative to the beginning of the file. | 319 * Offset of the enum name relative to the beginning of the file. |
| 300 */ | 320 */ |
| 301 @informative | 321 @informative |
| 302 int nameOffset; | 322 int nameOffset; |
| 303 | 323 |
| 304 /** | 324 /** |
| 325 * Documentation comment for the enum, or `null` if there is no documentation |
| 326 * comment. |
| 327 */ |
| 328 @informative |
| 329 UnlinkedDocumentationComment documentationComment; |
| 330 |
| 331 /** |
| 305 * Values listed in the enum declaration, in declaration order. | 332 * Values listed in the enum declaration, in declaration order. |
| 306 */ | 333 */ |
| 307 List<UnlinkedEnumValue> values; | 334 List<UnlinkedEnumValue> values; |
| 308 } | 335 } |
| 309 | 336 |
| 310 /** | 337 /** |
| 311 * Unlinked summary information about a single enumerated value in an enum | 338 * Unlinked summary information about a single enumerated value in an enum |
| 312 * declaration. | 339 * declaration. |
| 313 */ | 340 */ |
| 314 class UnlinkedEnumValue { | 341 class UnlinkedEnumValue { |
| 315 /** | 342 /** |
| 316 * Name of the enumerated value. | 343 * Name of the enumerated value. |
| 317 */ | 344 */ |
| 318 String name; | 345 String name; |
| 319 | 346 |
| 320 /** | 347 /** |
| 321 * Offset of the enum value name relative to the beginning of the file. | 348 * Offset of the enum value name relative to the beginning of the file. |
| 322 */ | 349 */ |
| 323 @informative | 350 @informative |
| 324 int nameOffset; | 351 int nameOffset; |
| 352 |
| 353 /** |
| 354 * Documentation comment for the enum value, or `null` if there is no |
| 355 * documentation comment. |
| 356 */ |
| 357 @informative |
| 358 UnlinkedDocumentationComment documentationComment; |
| 325 } | 359 } |
| 326 | 360 |
| 327 /** | 361 /** |
| 328 * Unlinked summary information about a function, method, getter, or setter | 362 * Unlinked summary information about a function, method, getter, or setter |
| 329 * declaration. | 363 * declaration. |
| 330 */ | 364 */ |
| 331 class UnlinkedExecutable { | 365 class UnlinkedExecutable { |
| 332 /** | 366 /** |
| 333 * Name of the executable. For setters, this includes the trailing "=". For | 367 * Name of the executable. For setters, this includes the trailing "=". For |
| 334 * named constructors, this excludes the class name and excludes the ".". | 368 * named constructors, this excludes the class name and excludes the ".". |
| 335 * For unnamed constructors, this is the empty string. | 369 * For unnamed constructors, this is the empty string. |
| 336 */ | 370 */ |
| 337 String name; | 371 String name; |
| 338 | 372 |
| 339 /** | 373 /** |
| 340 * Offset of the executable name relative to the beginning of the file. For | 374 * Offset of the executable name relative to the beginning of the file. For |
| 341 * named constructors, this excludes the class name and excludes the ".". | 375 * named constructors, this excludes the class name and excludes the ".". |
| 342 * For unnamed constructors, this is the offset of the class name (i.e. the | 376 * For unnamed constructors, this is the offset of the class name (i.e. the |
| 343 * offset of the second "C" in "class C { C(); }"). | 377 * offset of the second "C" in "class C { C(); }"). |
| 344 */ | 378 */ |
| 345 @informative | 379 @informative |
| 346 int nameOffset; | 380 int nameOffset; |
| 347 | 381 |
| 348 /** | 382 /** |
| 383 * Documentation comment for the executable, or `null` if there is no |
| 384 * documentation comment. |
| 385 */ |
| 386 @informative |
| 387 UnlinkedDocumentationComment documentationComment; |
| 388 |
| 389 /** |
| 349 * Type parameters of the executable, if any. Empty if support for generic | 390 * Type parameters of the executable, if any. Empty if support for generic |
| 350 * method syntax is disabled. | 391 * method syntax is disabled. |
| 351 */ | 392 */ |
| 352 List<UnlinkedTypeParam> typeParameters; | 393 List<UnlinkedTypeParam> typeParameters; |
| 353 | 394 |
| 354 /** | 395 /** |
| 355 * Declared return type of the executable. Absent if the return type is | 396 * Declared return type of the executable. Absent if the return type is |
| 356 * `void` or the executable is a constructor. Note that when strong mode is | 397 * `void` or the executable is a constructor. Note that when strong mode is |
| 357 * enabled, the actual return type may be different due to type inference. | 398 * enabled, the actual return type may be different due to type inference. |
| 358 */ | 399 */ |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 711 */ | 752 */ |
| 712 String name; | 753 String name; |
| 713 | 754 |
| 714 /** | 755 /** |
| 715 * Offset of the typedef name relative to the beginning of the file. | 756 * Offset of the typedef name relative to the beginning of the file. |
| 716 */ | 757 */ |
| 717 @informative | 758 @informative |
| 718 int nameOffset; | 759 int nameOffset; |
| 719 | 760 |
| 720 /** | 761 /** |
| 762 * Documentation comment for the typedef, or `null` if there is no |
| 763 * documentation comment. |
| 764 */ |
| 765 @informative |
| 766 UnlinkedDocumentationComment documentationComment; |
| 767 |
| 768 /** |
| 721 * Type parameters of the typedef, if any. | 769 * Type parameters of the typedef, if any. |
| 722 */ | 770 */ |
| 723 List<UnlinkedTypeParam> typeParameters; | 771 List<UnlinkedTypeParam> typeParameters; |
| 724 | 772 |
| 725 /** | 773 /** |
| 726 * Return type of the typedef. Absent if the return type is `void`. | 774 * Return type of the typedef. Absent if the return type is `void`. |
| 727 */ | 775 */ |
| 728 UnlinkedTypeRef returnType; | 776 UnlinkedTypeRef returnType; |
| 729 | 777 |
| 730 /** | 778 /** |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 817 int libraryNameOffset; | 865 int libraryNameOffset; |
| 818 | 866 |
| 819 /** | 867 /** |
| 820 * Length of the library name as it appears in the source code (or 0 if the | 868 * Length of the library name as it appears in the source code (or 0 if the |
| 821 * library has no name). | 869 * library has no name). |
| 822 */ | 870 */ |
| 823 @informative | 871 @informative |
| 824 int libraryNameLength; | 872 int libraryNameLength; |
| 825 | 873 |
| 826 /** | 874 /** |
| 875 * Documentation comment for the library, or `null` if there is no |
| 876 * documentation comment. |
| 877 */ |
| 878 @informative |
| 879 UnlinkedDocumentationComment libraryDocumentationComment; |
| 880 |
| 881 /** |
| 827 * Unlinked public namespace of this compilation unit. | 882 * Unlinked public namespace of this compilation unit. |
| 828 */ | 883 */ |
| 829 UnlinkedPublicNamespace publicNamespace; | 884 UnlinkedPublicNamespace publicNamespace; |
| 830 | 885 |
| 831 /** | 886 /** |
| 832 * Top level and prefixed names referred to by this compilation unit. The | 887 * Top level and prefixed names referred to by this compilation unit. The |
| 833 * zeroth element of this array is always populated and always represents a | 888 * zeroth element of this array is always populated and always represents a |
| 834 * reference to the pseudo-type "dynamic". | 889 * reference to the pseudo-type "dynamic". |
| 835 */ | 890 */ |
| 836 List<UnlinkedReference> references; | 891 List<UnlinkedReference> references; |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 887 */ | 942 */ |
| 888 String name; | 943 String name; |
| 889 | 944 |
| 890 /** | 945 /** |
| 891 * Offset of the variable name relative to the beginning of the file. | 946 * Offset of the variable name relative to the beginning of the file. |
| 892 */ | 947 */ |
| 893 @informative | 948 @informative |
| 894 int nameOffset; | 949 int nameOffset; |
| 895 | 950 |
| 896 /** | 951 /** |
| 952 * Documentation comment for the variable, or `null` if there is no |
| 953 * documentation comment. |
| 954 */ |
| 955 @informative |
| 956 UnlinkedDocumentationComment documentationComment; |
| 957 |
| 958 /** |
| 897 * Declared type of the variable. Note that when strong mode is enabled, the | 959 * Declared type of the variable. Note that when strong mode is enabled, the |
| 898 * actual type of the variable may be different due to type inference. | 960 * actual type of the variable may be different due to type inference. |
| 899 */ | 961 */ |
| 900 UnlinkedTypeRef type; | 962 UnlinkedTypeRef type; |
| 901 | 963 |
| 902 /** | 964 /** |
| 903 * Indicates whether the variable is declared using the `static` keyword. | 965 * Indicates whether the variable is declared using the `static` keyword. |
| 904 * | 966 * |
| 905 * Note that for top level variables, this flag is false, since they are not | 967 * Note that for top level variables, this flag is false, since they are not |
| 906 * declared using the `static` keyword (even though they are considered | 968 * declared using the `static` keyword (even though they are considered |
| 907 * static for semantic purposes). | 969 * static for semantic purposes). |
| 908 */ | 970 */ |
| 909 bool isStatic; | 971 bool isStatic; |
| 910 | 972 |
| 911 /** | 973 /** |
| 912 * Indicates whether the variable is declared using the `final` keyword. | 974 * Indicates whether the variable is declared using the `final` keyword. |
| 913 */ | 975 */ |
| 914 bool isFinal; | 976 bool isFinal; |
| 915 | 977 |
| 916 /** | 978 /** |
| 917 * Indicates whether the variable is declared using the `const` keyword. | 979 * Indicates whether the variable is declared using the `const` keyword. |
| 918 */ | 980 */ |
| 919 bool isConst; | 981 bool isConst; |
| 920 | 982 |
| 921 /** | 983 /** |
| 922 * Indicates whether this variable lacks an explicit type declaration. | 984 * Indicates whether this variable lacks an explicit type declaration. |
| 923 */ | 985 */ |
| 924 bool hasImplicitType; | 986 bool hasImplicitType; |
| 925 } | 987 } |
| OLD | NEW |