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

Side by Side Diff: pkg/analyzer/lib/src/summary/idl.dart

Issue 1672413002: Add summary support for annotations. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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) 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 6 * This file is an "idl" style description of the summary format. It
7 * contains abstract classes which declare the interface for reading data from 7 * contains abstract classes which declare the interface for reading data from
8 * summaries. It is parsed and transformed into code that implements the 8 * summaries. It is parsed and transformed into code that implements the
9 * summary format. 9 * summary format.
10 * 10 *
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 int get nameOffset; 433 int get nameOffset;
434 434
435 /** 435 /**
436 * Documentation comment for the class, or `null` if there is no 436 * Documentation comment for the class, or `null` if there is no
437 * documentation comment. 437 * documentation comment.
438 */ 438 */
439 @informative 439 @informative
440 UnlinkedDocumentationComment get documentationComment; 440 UnlinkedDocumentationComment get documentationComment;
441 441
442 /** 442 /**
443 * Annotations for this class.
444 */
445 List<UnlinkedConst> get annotations;
446
447 /**
443 * Type parameters of the class, if any. 448 * Type parameters of the class, if any.
444 */ 449 */
445 List<UnlinkedTypeParam> get typeParameters; 450 List<UnlinkedTypeParam> get typeParameters;
446 451
447 /** 452 /**
448 * Supertype of the class, or `null` if either (a) the class doesn't 453 * Supertype of the class, or `null` if either (a) the class doesn't
449 * explicitly declare a supertype (and hence has supertype `Object`), or (b) 454 * explicitly declare a supertype (and hence has supertype `Object`), or (b)
450 * the class *is* `Object` (and hence has no supertype). 455 * the class *is* `Object` (and hence has no supertype).
451 */ 456 */
452 EntityRef get supertype; 457 EntityRef get supertype;
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
872 int get nameOffset; 877 int get nameOffset;
873 878
874 /** 879 /**
875 * Documentation comment for the enum, or `null` if there is no documentation 880 * Documentation comment for the enum, or `null` if there is no documentation
876 * comment. 881 * comment.
877 */ 882 */
878 @informative 883 @informative
879 UnlinkedDocumentationComment get documentationComment; 884 UnlinkedDocumentationComment get documentationComment;
880 885
881 /** 886 /**
887 * Annotations for this enum.
888 */
889 List<UnlinkedConst> get annotations;
890
891 /**
882 * Values listed in the enum declaration, in declaration order. 892 * Values listed in the enum declaration, in declaration order.
883 */ 893 */
884 List<UnlinkedEnumValue> get values; 894 List<UnlinkedEnumValue> get values;
885 } 895 }
886 896
887 /** 897 /**
888 * Unlinked summary information about a single enumerated value in an enum 898 * Unlinked summary information about a single enumerated value in an enum
889 * declaration. 899 * declaration.
890 */ 900 */
891 abstract class UnlinkedEnumValue extends base.SummaryClass { 901 abstract class UnlinkedEnumValue extends base.SummaryClass {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
930 int get nameOffset; 940 int get nameOffset;
931 941
932 /** 942 /**
933 * Documentation comment for the executable, or `null` if there is no 943 * Documentation comment for the executable, or `null` if there is no
934 * documentation comment. 944 * documentation comment.
935 */ 945 */
936 @informative 946 @informative
937 UnlinkedDocumentationComment get documentationComment; 947 UnlinkedDocumentationComment get documentationComment;
938 948
939 /** 949 /**
950 * Annotations for this executable.
951 */
952 List<UnlinkedConst> get annotations;
953
954 /**
940 * Type parameters of the executable, if any. Empty if support for generic 955 * Type parameters of the executable, if any. Empty if support for generic
941 * method syntax is disabled. 956 * method syntax is disabled.
942 */ 957 */
943 List<UnlinkedTypeParam> get typeParameters; 958 List<UnlinkedTypeParam> get typeParameters;
944 959
945 /** 960 /**
946 * Declared return type of the executable. Absent if the executable is a 961 * Declared return type of the executable. Absent if the executable is a
947 * constructor or the return type is implicit. 962 * constructor or the return type is implicit.
948 */ 963 */
949 EntityRef get returnType; 964 EntityRef get returnType;
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
1042 */ 1057 */
1043 @informative 1058 @informative
1044 int get uriOffset; 1059 int get uriOffset;
1045 1060
1046 /** 1061 /**
1047 * End of the URI string (including quotes) relative to the beginning of the 1062 * End of the URI string (including quotes) relative to the beginning of the
1048 * file. 1063 * file.
1049 */ 1064 */
1050 @informative 1065 @informative
1051 int get uriEnd; 1066 int get uriEnd;
1067
1068 /**
1069 * Annotations for this export directive.
1070 */
1071 List<UnlinkedConst> get annotations;
1052 } 1072 }
1053 1073
1054 /** 1074 /**
1055 * Unlinked summary information about an export declaration (stored inside 1075 * Unlinked summary information about an export declaration (stored inside
1056 * [UnlinkedPublicNamespace]). 1076 * [UnlinkedPublicNamespace]).
1057 */ 1077 */
1058 abstract class UnlinkedExportPublic extends base.SummaryClass { 1078 abstract class UnlinkedExportPublic extends base.SummaryClass {
1059 /** 1079 /**
1060 * URI used in the source code to reference the exported library. 1080 * URI used in the source code to reference the exported library.
1061 */ 1081 */
(...skipping 15 matching lines...) Expand all
1077 String get uri; 1097 String get uri;
1078 1098
1079 /** 1099 /**
1080 * If [isImplicit] is false, offset of the "import" keyword. If [isImplicit] 1100 * If [isImplicit] is false, offset of the "import" keyword. If [isImplicit]
1081 * is true, zero. 1101 * is true, zero.
1082 */ 1102 */
1083 @informative 1103 @informative
1084 int get offset; 1104 int get offset;
1085 1105
1086 /** 1106 /**
1107 * Annotations for this import declaration.
1108 */
1109 List<UnlinkedConst> get annotations;
1110
1111 /**
1087 * Index into [UnlinkedUnit.references] of the prefix declared by this 1112 * Index into [UnlinkedUnit.references] of the prefix declared by this
1088 * import declaration, or zero if this import declaration declares no prefix. 1113 * import declaration, or zero if this import declaration declares no prefix.
1089 * 1114 *
1090 * Note that multiple imports can declare the same prefix. 1115 * Note that multiple imports can declare the same prefix.
1091 */ 1116 */
1092 int get prefixReference; 1117 int get prefixReference;
1093 1118
1094 /** 1119 /**
1095 * Combinators contained in this import declaration. 1120 * Combinators contained in this import declaration.
1096 */ 1121 */
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
1137 */ 1162 */
1138 String get name; 1163 String get name;
1139 1164
1140 /** 1165 /**
1141 * Offset of the parameter name relative to the beginning of the file. 1166 * Offset of the parameter name relative to the beginning of the file.
1142 */ 1167 */
1143 @informative 1168 @informative
1144 int get nameOffset; 1169 int get nameOffset;
1145 1170
1146 /** 1171 /**
1172 * Annotations for this parameter.
1173 */
1174 List<UnlinkedConst> get annotations;
1175
1176 /**
1147 * If [isFunctionTyped] is `true`, the declared return type. If 1177 * If [isFunctionTyped] is `true`, the declared return type. If
1148 * [isFunctionTyped] is `false`, the declared type. Absent if the type is 1178 * [isFunctionTyped] is `false`, the declared type. Absent if the type is
1149 * implicit. 1179 * implicit.
1150 */ 1180 */
1151 EntityRef get type; 1181 EntityRef get type;
1152 1182
1153 /** 1183 /**
1154 * If [isFunctionTyped] is `true`, the parameters of the function type. 1184 * If [isFunctionTyped] is `true`, the parameters of the function type.
1155 */ 1185 */
1156 List<UnlinkedParam> get parameters; 1186 List<UnlinkedParam> get parameters;
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
1221 */ 1251 */
1222 @informative 1252 @informative
1223 int get uriOffset; 1253 int get uriOffset;
1224 1254
1225 /** 1255 /**
1226 * End of the URI string (including quotes) relative to the beginning of the 1256 * End of the URI string (including quotes) relative to the beginning of the
1227 * file. 1257 * file.
1228 */ 1258 */
1229 @informative 1259 @informative
1230 int get uriEnd; 1260 int get uriEnd;
1261
1262 /**
1263 * Annotations for this part declaration.
1264 */
1265 List<UnlinkedConst> get annotations;
1231 } 1266 }
1232 1267
1233 /** 1268 /**
1234 * Unlinked summary information about a specific name contributed by a 1269 * Unlinked summary information about a specific name contributed by a
1235 * compilation unit to a library's public namespace. 1270 * compilation unit to a library's public namespace.
1236 * 1271 *
1237 * TODO(paulberry): some of this information is redundant with information 1272 * TODO(paulberry): some of this information is redundant with information
1238 * elsewhere in the summary. Consider reducing the redundancy to reduce 1273 * elsewhere in the summary. Consider reducing the redundancy to reduce
1239 * summary size. 1274 * summary size.
1240 */ 1275 */
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
1330 int get nameOffset; 1365 int get nameOffset;
1331 1366
1332 /** 1367 /**
1333 * Documentation comment for the typedef, or `null` if there is no 1368 * Documentation comment for the typedef, or `null` if there is no
1334 * documentation comment. 1369 * documentation comment.
1335 */ 1370 */
1336 @informative 1371 @informative
1337 UnlinkedDocumentationComment get documentationComment; 1372 UnlinkedDocumentationComment get documentationComment;
1338 1373
1339 /** 1374 /**
1375 * Annotations for this typedef.
1376 */
1377 List<UnlinkedConst> get annotations;
1378
1379 /**
1340 * Type parameters of the typedef, if any. 1380 * Type parameters of the typedef, if any.
1341 */ 1381 */
1342 List<UnlinkedTypeParam> get typeParameters; 1382 List<UnlinkedTypeParam> get typeParameters;
1343 1383
1344 /** 1384 /**
1345 * Return type of the typedef. 1385 * Return type of the typedef.
1346 */ 1386 */
1347 EntityRef get returnType; 1387 EntityRef get returnType;
1348 1388
1349 /** 1389 /**
(...skipping 11 matching lines...) Expand all
1361 */ 1401 */
1362 String get name; 1402 String get name;
1363 1403
1364 /** 1404 /**
1365 * Offset of the type parameter name relative to the beginning of the file. 1405 * Offset of the type parameter name relative to the beginning of the file.
1366 */ 1406 */
1367 @informative 1407 @informative
1368 int get nameOffset; 1408 int get nameOffset;
1369 1409
1370 /** 1410 /**
1411 * Annotations for this type parameter.
1412 */
1413 List<UnlinkedConst> get annotations;
1414
1415 /**
1371 * Bound of the type parameter, if a bound is explicitly declared. Otherwise 1416 * Bound of the type parameter, if a bound is explicitly declared. Otherwise
1372 * null. 1417 * null.
1373 */ 1418 */
1374 EntityRef get bound; 1419 EntityRef get bound;
1375 } 1420 }
1376 1421
1377 /** 1422 /**
1378 * Unlinked summary information about a compilation unit ("part file"). 1423 * Unlinked summary information about a compilation unit ("part file").
1379 */ 1424 */
1380 @topLevel 1425 @topLevel
(...skipping 21 matching lines...) Expand all
1402 int get libraryNameLength; 1447 int get libraryNameLength;
1403 1448
1404 /** 1449 /**
1405 * Documentation comment for the library, or `null` if there is no 1450 * Documentation comment for the library, or `null` if there is no
1406 * documentation comment. 1451 * documentation comment.
1407 */ 1452 */
1408 @informative 1453 @informative
1409 UnlinkedDocumentationComment get libraryDocumentationComment; 1454 UnlinkedDocumentationComment get libraryDocumentationComment;
1410 1455
1411 /** 1456 /**
1457 * Annotations for the library declaration, or the empty list if there is no
1458 * library declaration.
1459 */
1460 List<UnlinkedConst> get libraryAnnotations;
1461
1462 /**
1412 * Unlinked public namespace of this compilation unit. 1463 * Unlinked public namespace of this compilation unit.
1413 */ 1464 */
1414 UnlinkedPublicNamespace get publicNamespace; 1465 UnlinkedPublicNamespace get publicNamespace;
1415 1466
1416 /** 1467 /**
1417 * Top level and prefixed names referred to by this compilation unit. The 1468 * Top level and prefixed names referred to by this compilation unit. The
1418 * zeroth element of this array is always populated and is used to represent 1469 * zeroth element of this array is always populated and is used to represent
1419 * the absence of a reference in places where a reference is optional (for 1470 * the absence of a reference in places where a reference is optional (for
1420 * example [UnlinkedReference.prefixReference or 1471 * example [UnlinkedReference.prefixReference or
1421 * UnlinkedImport.prefixReference]). 1472 * UnlinkedImport.prefixReference]).
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
1481 int get nameOffset; 1532 int get nameOffset;
1482 1533
1483 /** 1534 /**
1484 * Documentation comment for the variable, or `null` if there is no 1535 * Documentation comment for the variable, or `null` if there is no
1485 * documentation comment. 1536 * documentation comment.
1486 */ 1537 */
1487 @informative 1538 @informative
1488 UnlinkedDocumentationComment get documentationComment; 1539 UnlinkedDocumentationComment get documentationComment;
1489 1540
1490 /** 1541 /**
1542 * Annotations for this variable.
1543 */
1544 List<UnlinkedConst> get annotations;
1545
1546 /**
1491 * Declared type of the variable. Absent if the type is implicit. 1547 * Declared type of the variable. Absent if the type is implicit.
1492 */ 1548 */
1493 EntityRef get type; 1549 EntityRef get type;
1494 1550
1495 /** 1551 /**
1496 * If [isConst] is true, and the variable has an initializer, the constant 1552 * If [isConst] is true, and the variable has an initializer, the constant
1497 * expression in the initializer. 1553 * expression in the initializer.
1498 */ 1554 */
1499 UnlinkedConst get constExpr; 1555 UnlinkedConst get constExpr;
1500 1556
(...skipping 27 matching lines...) Expand all
1528 int get propagatedTypeSlot; 1584 int get propagatedTypeSlot;
1529 1585
1530 /** 1586 /**
1531 * If this variable is inferable, nonzero slot id identifying which entry in 1587 * If this variable is inferable, nonzero slot id identifying which entry in
1532 * [LinkedLibrary.types] contains the inferred type for this variable. If 1588 * [LinkedLibrary.types] contains the inferred type for this variable. If
1533 * there is no matching entry in [LinkedLibrary.types], then no type was 1589 * there is no matching entry in [LinkedLibrary.types], then no type was
1534 * inferred for this variable, so its static type is `dynamic`. 1590 * inferred for this variable, so its static type is `dynamic`.
1535 */ 1591 */
1536 int get inferredTypeSlot; 1592 int get inferredTypeSlot;
1537 } 1593 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/summary/format.dart ('k') | pkg/analyzer/lib/src/summary/resynthesize.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698