@@ -706,6 +706,14 @@ module Make0<LocationSig Location, AstSig<Location> Ast> {
706706 */
707707 abstract AstNode getAstNode ( ) ;
708708
709+ /**
710+ * INTERNAL: Do not use.
711+ *
712+ * Gets a tag such that the pair `(getAstNode(), getIdTag())` uniquely
713+ * identifies this node.
714+ */
715+ abstract string getIdTag ( ) ;
716+
709717 /** Gets a textual representation of this node. */
710718 abstract string toString ( ) ;
711719
@@ -727,6 +735,8 @@ module Make0<LocationSig Location, AstSig<Location> Ast> {
727735
728736 override AstNode getAstNode ( ) { result = n }
729737
738+ override string getIdTag ( ) { result = "before" }
739+
730740 override string toString ( ) {
731741 if postOrInOrder ( n ) then result = "Before " + n .toString ( ) else result = n .toString ( )
732742 }
@@ -739,6 +749,8 @@ module Make0<LocationSig Location, AstSig<Location> Ast> {
739749
740750 override AstNode getAstNode ( ) { result = n }
741751
752+ override string getIdTag ( ) { result = "ast" }
753+
742754 override string toString ( ) { result = n .toString ( ) }
743755 }
744756
@@ -750,6 +762,12 @@ module Make0<LocationSig Location, AstSig<Location> Ast> {
750762
751763 override AstNode getAstNode ( ) { result = n }
752764
765+ override string getIdTag ( ) {
766+ t .getValue ( ) = true and result = "after-true"
767+ or
768+ t .getValue ( ) = false and result = "after-false"
769+ }
770+
753771 override string toString ( ) { result = "After " + n .toString ( ) + " [" + t .toString ( ) + "]" }
754772 }
755773
@@ -760,6 +778,8 @@ module Make0<LocationSig Location, AstSig<Location> Ast> {
760778
761779 override AstNode getAstNode ( ) { result = n }
762780
781+ override string getIdTag ( ) { result = "after" }
782+
763783 override string toString ( ) { result = "After " + n .toString ( ) }
764784 }
765785
@@ -773,6 +793,8 @@ module Make0<LocationSig Location, AstSig<Location> Ast> {
773793
774794 NormalSuccessor getSuccessorType ( ) { additionalNode ( n , tag , result ) }
775795
796+ override string getIdTag ( ) { result = "add. " + tag }
797+
776798 override string toString ( ) { result = tag + " " + n .toString ( ) }
777799 }
778800
@@ -785,6 +807,8 @@ module Make0<LocationSig Location, AstSig<Location> Ast> {
785807
786808 override AstNode getAstNode ( ) { result = c }
787809
810+ override string getIdTag ( ) { result = "entry" }
811+
788812 override string toString ( ) { result = "Entry" }
789813 }
790814
@@ -799,6 +823,12 @@ module Make0<LocationSig Location, AstSig<Location> Ast> {
799823
800824 override AstNode getAstNode ( ) { result = c }
801825
826+ override string getIdTag ( ) {
827+ normal = true and result = "exit-normal"
828+ or
829+ normal = false and result = "exit-exc"
830+ }
831+
802832 override string toString ( ) {
803833 normal = true and result = "Normal Exit"
804834 or
@@ -826,6 +856,8 @@ module Make0<LocationSig Location, AstSig<Location> Ast> {
826856
827857 override AstNode getAstNode ( ) { result = c }
828858
859+ override string getIdTag ( ) { result = "exit" }
860+
829861 override string toString ( ) { result = "Exit" }
830862 }
831863
0 commit comments