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

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

Issue 1718603002: Add summary support for ConstructorElement.nameEnd and .periodOffset. (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 1145 matching lines...) Expand 10 before | Expand all | Expand 10 after
1156 1156
1157 /** 1157 /**
1158 * Name of the executable. For setters, this includes the trailing "=". For 1158 * Name of the executable. For setters, this includes the trailing "=". For
1159 * named constructors, this excludes the class name and excludes the ".". 1159 * named constructors, this excludes the class name and excludes the ".".
1160 * For unnamed constructors, this is the empty string. 1160 * For unnamed constructors, this is the empty string.
1161 */ 1161 */
1162 @Id(1) 1162 @Id(1)
1163 String get name; 1163 String get name;
1164 1164
1165 /** 1165 /**
1166 * If [kind] is [UnlinkedExecutableKind.constructor] and [name] is not empty,
1167 * the offset of the end of the constructor name. Otherwise zero.
1168 */
1169 @informative
1170 @Id(23)
1171 int get nameEnd;
1172
1173 /**
1166 * Offset of the executable name relative to the beginning of the file. For 1174 * Offset of the executable name relative to the beginning of the file. For
1167 * named constructors, this excludes the class name and excludes the ".". 1175 * named constructors, this excludes the class name and excludes the ".".
1168 * For unnamed constructors, this is the offset of the class name (i.e. the 1176 * For unnamed constructors, this is the offset of the class name (i.e. the
1169 * offset of the second "C" in "class C { C(); }"). 1177 * offset of the second "C" in "class C { C(); }").
1170 */ 1178 */
1171 @informative 1179 @informative
1172 @Id(0) 1180 @Id(0)
1173 int get nameOffset; 1181 int get nameOffset;
1174 1182
1175 /** 1183 /**
1176 * Parameters of the executable, if any. Note that getters have no 1184 * Parameters of the executable, if any. Note that getters have no
1177 * parameters (hence this will be the empty list), and setters have a single 1185 * parameters (hence this will be the empty list), and setters have a single
1178 * parameter. 1186 * parameter.
1179 */ 1187 */
1180 @Id(2) 1188 @Id(2)
1181 List<UnlinkedParam> get parameters; 1189 List<UnlinkedParam> get parameters;
1182 1190
1183 /** 1191 /**
1192 * If [kind] is [UnlinkedExecutableKind.constructor] and [name] is not empty,
1193 * the offset of the period before the constructor name. Otherwise zero.
1194 */
1195 @informative
1196 @Id(24)
1197 int get periodOffset;
1198
1199 /**
1184 * If [isRedirectedConstructor] and [isFactory] are both `true`, the 1200 * If [isRedirectedConstructor] and [isFactory] are both `true`, the
1185 * constructor to which this constructor redirects; otherwise empty. 1201 * constructor to which this constructor redirects; otherwise empty.
1186 */ 1202 */
1187 @Id(15) 1203 @Id(15)
1188 EntityRef get redirectedConstructor; 1204 EntityRef get redirectedConstructor;
1189 1205
1190 /** 1206 /**
1191 * If [isRedirectedConstructor] is `true` and [isFactory] is `false`, the 1207 * If [isRedirectedConstructor] is `true` and [isFactory] is `false`, the
1192 * name of the constructor that this constructor redirects to; otherwise 1208 * name of the constructor that this constructor redirects to; otherwise
1193 * empty. 1209 * empty.
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
1422 1438
1423 /** 1439 /**
1424 * If the parameter has a default value, the constant expression in the 1440 * If the parameter has a default value, the constant expression in the
1425 * default value. Note that the presence of this expression does not mean 1441 * default value. Note that the presence of this expression does not mean
1426 * that it is a valid, check [UnlinkedConst.isInvalid]. 1442 * that it is a valid, check [UnlinkedConst.isInvalid].
1427 */ 1443 */
1428 @Id(7) 1444 @Id(7)
1429 UnlinkedConst get defaultValue; 1445 UnlinkedConst get defaultValue;
1430 1446
1431 /** 1447 /**
1448 * If the parameter has a default value, the source text of the constant
1449 * expression in the default value. Otherwise the empty string.
1450 */
1451 @informative
1452 @Id(13)
1453 String get defaultValueCode;
1454
1455 /**
1432 * If this parameter's type is inferable, nonzero slot id identifying which 1456 * If this parameter's type is inferable, nonzero slot id identifying which
1433 * entry in [LinkedLibrary.types] contains the inferred type. If there is no 1457 * entry in [LinkedLibrary.types] contains the inferred type. If there is no
1434 * matching entry in [LinkedLibrary.types], then no type was inferred for 1458 * matching entry in [LinkedLibrary.types], then no type was inferred for
1435 * this variable, so its static type is `dynamic`. 1459 * this variable, so its static type is `dynamic`.
1436 * 1460 *
1437 * Note that although strong mode considers initializing formals to be 1461 * Note that although strong mode considers initializing formals to be
1438 * inferable, they are not marked as such in the summary; if their type is 1462 * inferable, they are not marked as such in the summary; if their type is
1439 * not specified, they always inherit the static type of the corresponding 1463 * not specified, they always inherit the static type of the corresponding
1440 * field. 1464 * field.
1441 */ 1465 */
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
1475 String get name; 1499 String get name;
1476 1500
1477 /** 1501 /**
1478 * Offset of the parameter name relative to the beginning of the file. 1502 * Offset of the parameter name relative to the beginning of the file.
1479 */ 1503 */
1480 @informative 1504 @informative
1481 @Id(1) 1505 @Id(1)
1482 int get nameOffset; 1506 int get nameOffset;
1483 1507
1484 /** 1508 /**
1485 * If the parameter has a default value, the source text of the constant
1486 * expression in the default value. Otherwise the empty string.
1487 */
1488 @informative
1489 @Id(13)
1490 String get defaultValueCode;
1491
1492 /**
1493 * If [isFunctionTyped] is `true`, the parameters of the function type. 1509 * If [isFunctionTyped] is `true`, the parameters of the function type.
1494 */ 1510 */
1495 @Id(8) 1511 @Id(8)
1496 List<UnlinkedParam> get parameters; 1512 List<UnlinkedParam> get parameters;
1497 1513
1498 /** 1514 /**
1499 * If [isFunctionTyped] is `true`, the declared return type. If 1515 * If [isFunctionTyped] is `true`, the declared return type. If
1500 * [isFunctionTyped] is `false`, the declared type. Absent if the type is 1516 * [isFunctionTyped] is `false`, the declared type. Absent if the type is
1501 * implicit. 1517 * implicit.
1502 */ 1518 */
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
1952 */ 1968 */
1953 @Id(11) 1969 @Id(11)
1954 int get visibleLength; 1970 int get visibleLength;
1955 1971
1956 /** 1972 /**
1957 * If a local variable, the beginning of the visible range; zero otherwise. 1973 * If a local variable, the beginning of the visible range; zero otherwise.
1958 */ 1974 */
1959 @Id(12) 1975 @Id(12)
1960 int get visibleOffset; 1976 int get visibleOffset;
1961 } 1977 }
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