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

Side by Side Diff: pkg/analyzer/tool/summary/idl.dart

Issue 1565283002: Add uriOffset and uriEnd to the summary. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « pkg/analyzer/test/src/summary/summary_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 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 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 */ 399 */
400 setter, 400 setter,
401 401
402 /** 402 /**
403 * Executable is a constructor. 403 * Executable is a constructor.
404 */ 404 */
405 constructor 405 constructor
406 } 406 }
407 407
408 /** 408 /**
409 * Unlinked summary information about an export declaration. 409 * Unlinked summary information about an export declaration (stored outside
410 * [UnlinkedPublicNamespace]).
410 */ 411 */
411 class UnlinkedExport { 412 class UnlinkedExportNonPublic {
413 /**
414 * Offset of the URI string (including quotes) relative to the beginning of
415 * the file.
416 */
417 @informative
418 int uriOffset;
419
420 /**
421 * End of the URI string (including quotes) relative to the beginning of the
422 * file.
423 */
424 @informative
425 int uriEnd;
426 }
427
428 /**
429 * Unlinked summary information about an export declaration (stored inside
430 * [UnlinkedPublicNamespace]).
431 */
432 class UnlinkedExportPublic {
412 /** 433 /**
413 * URI used in the source code to reference the exported library. 434 * URI used in the source code to reference the exported library.
414 */ 435 */
415 String uri; 436 String uri;
416 437
417 /** 438 /**
418 * Combinators contained in this import declaration. 439 * Combinators contained in this import declaration.
419 */ 440 */
420 List<UnlinkedCombinator> combinators; 441 List<UnlinkedCombinator> combinators;
421 } 442 }
(...skipping 29 matching lines...) Expand all
451 472
452 /** 473 /**
453 * Indicates whether the import declaration uses the `deferred` keyword. 474 * Indicates whether the import declaration uses the `deferred` keyword.
454 */ 475 */
455 bool isDeferred; 476 bool isDeferred;
456 477
457 /** 478 /**
458 * Indicates whether the import declaration is implicit. 479 * Indicates whether the import declaration is implicit.
459 */ 480 */
460 bool isImplicit; 481 bool isImplicit;
482
483 /**
484 * Offset of the URI string (including quotes) relative to the beginning of
485 * the file. If [isImplicit] is true, zero.
486 */
487 @informative
488 int uriOffset;
489
490 /**
491 * End of the URI string (including quotes) relative to the beginning of the
492 * file. If [isImplicit] is true, zero.
493 */
494 @informative
495 int uriEnd;
461 } 496 }
462 497
463 /** 498 /**
464 * Unlinked summary information about a function parameter. 499 * Unlinked summary information about a function parameter.
465 */ 500 */
466 class UnlinkedParam { 501 class UnlinkedParam {
467 /** 502 /**
468 * Name of the parameter. 503 * Name of the parameter.
469 */ 504 */
470 String name; 505 String name;
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 * Parameter is named optional (enclosed in `{}`) 559 * Parameter is named optional (enclosed in `{}`)
525 */ 560 */
526 named 561 named
527 } 562 }
528 563
529 /** 564 /**
530 * Unlinked summary information about a part declaration. 565 * Unlinked summary information about a part declaration.
531 */ 566 */
532 class UnlinkedPart { 567 class UnlinkedPart {
533 /** 568 /**
534 * String used in the compilation unit to refer to the part file. 569 * Offset of the URI string (including quotes) relative to the beginning of
570 * the file.
535 */ 571 */
536 String uri; 572 @informative
573 int uriOffset;
574
575 /**
576 * End of the URI string (including quotes) relative to the beginning of the
577 * file.
578 */
579 @informative
580 int uriEnd;
537 } 581 }
538 582
539 /** 583 /**
540 * Unlinked summary information about a specific name contributed by a 584 * Unlinked summary information about a specific name contributed by a
541 * compilation unit to a library's public namespace. 585 * compilation unit to a library's public namespace.
542 * 586 *
543 * TODO(paulberry): add a count of generic parameters, so that resynthesis 587 * TODO(paulberry): add a count of generic parameters, so that resynthesis
544 * doesn't have to peek into the library to obtain this info. 588 * doesn't have to peek into the library to obtain this info.
545 * 589 *
546 * TODO(paulberry): for classes, add info about static members and 590 * TODO(paulberry): for classes, add info about static members and
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 * Public names defined in the compilation unit. 623 * Public names defined in the compilation unit.
580 * 624 *
581 * TODO(paulberry): consider sorting these names to reduce unnecessary 625 * TODO(paulberry): consider sorting these names to reduce unnecessary
582 * relinking. 626 * relinking.
583 */ 627 */
584 List<UnlinkedPublicName> names; 628 List<UnlinkedPublicName> names;
585 629
586 /** 630 /**
587 * Export declarations in the compilation unit. 631 * Export declarations in the compilation unit.
588 */ 632 */
589 List<UnlinkedExport> exports; 633 List<UnlinkedExportPublic> exports;
590 634
591 /** 635 /**
592 * Part declarations in the compilation unit. 636 * URIs referenced by part declarations in the compilation unit.
593 */ 637 */
594 List<UnlinkedPart> parts; 638 List<String> parts;
595 } 639 }
596 640
597 /** 641 /**
598 * Unlinked summary information about a name referred to in one library that 642 * Unlinked summary information about a name referred to in one library that
599 * might be defined in another. 643 * might be defined in another.
600 */ 644 */
601 class UnlinkedReference { 645 class UnlinkedReference {
602 /** 646 /**
603 * Name of the entity being referred to. The empty string refers to the 647 * Name of the entity being referred to. The empty string refers to the
604 * pseudo-type `dynamic`. 648 * pseudo-type `dynamic`.
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
729 */ 773 */
730 List<UnlinkedEnum> enums; 774 List<UnlinkedEnum> enums;
731 775
732 /** 776 /**
733 * Top level executable objects (functions, getters, and setters) declared in 777 * Top level executable objects (functions, getters, and setters) declared in
734 * the compilation unit. 778 * the compilation unit.
735 */ 779 */
736 List<UnlinkedExecutable> executables; 780 List<UnlinkedExecutable> executables;
737 781
738 /** 782 /**
783 * Export declarations in the compilation unit.
784 */
785 List<UnlinkedExportNonPublic> exports;
786
787 /**
739 * Import declarations in the compilation unit. 788 * Import declarations in the compilation unit.
740 */ 789 */
741 List<UnlinkedImport> imports; 790 List<UnlinkedImport> imports;
742 791
743 /** 792 /**
793 * Part declarations in the compilation unit.
794 */
795 List<UnlinkedPart> parts;
796
797 /**
744 * Typedefs declared in the compilation unit. 798 * Typedefs declared in the compilation unit.
745 */ 799 */
746 List<UnlinkedTypedef> typedefs; 800 List<UnlinkedTypedef> typedefs;
747 801
748 /** 802 /**
749 * Top level variables declared in the compilation unit. 803 * Top level variables declared in the compilation unit.
750 */ 804 */
751 List<UnlinkedVariable> variables; 805 List<UnlinkedVariable> variables;
752 } 806 }
753 807
(...skipping 30 matching lines...) Expand all
784 /** 838 /**
785 * Indicates whether the variable is declared using the `const` keyword. 839 * Indicates whether the variable is declared using the `const` keyword.
786 */ 840 */
787 bool isConst; 841 bool isConst;
788 842
789 /** 843 /**
790 * Indicates whether this variable lacks an explicit type declaration. 844 * Indicates whether this variable lacks an explicit type declaration.
791 */ 845 */
792 bool hasImplicitType; 846 bool hasImplicitType;
793 } 847 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/src/summary/summary_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698