@@ -689,6 +689,14 @@ module Make0<LocationSig Location, AstSig<Location> Ast> {
689689 */
690690 abstract AstNode getAstNode ( ) ;
691691
692+ /**
693+ * INTERNAL: Do not use.
694+ *
695+ * Gets a tag such that the pair `(getAstNode(), getIdTag())` uniquely
696+ * identifies this node.
697+ */
698+ abstract string getIdTag ( ) ;
699+
692700 /** Gets a textual representation of this node. */
693701 abstract string toString ( ) ;
694702
@@ -710,6 +718,8 @@ module Make0<LocationSig Location, AstSig<Location> Ast> {
710718
711719 override AstNode getAstNode ( ) { result = n }
712720
721+ override string getIdTag ( ) { result = "before" }
722+
713723 override string toString ( ) {
714724 if postOrInOrder ( n ) then result = "Before " + n .toString ( ) else result = n .toString ( )
715725 }
@@ -722,6 +732,8 @@ module Make0<LocationSig Location, AstSig<Location> Ast> {
722732
723733 override AstNode getAstNode ( ) { result = n }
724734
735+ override string getIdTag ( ) { result = "ast" }
736+
725737 override string toString ( ) { result = n .toString ( ) }
726738 }
727739
@@ -733,6 +745,12 @@ module Make0<LocationSig Location, AstSig<Location> Ast> {
733745
734746 override AstNode getAstNode ( ) { result = n }
735747
748+ override string getIdTag ( ) {
749+ t .getValue ( ) = true and result = "after-true"
750+ or
751+ t .getValue ( ) = false and result = "after-false"
752+ }
753+
736754 override string toString ( ) { result = "After " + n .toString ( ) + " [" + t .toString ( ) + "]" }
737755 }
738756
@@ -743,6 +761,8 @@ module Make0<LocationSig Location, AstSig<Location> Ast> {
743761
744762 override AstNode getAstNode ( ) { result = n }
745763
764+ override string getIdTag ( ) { result = "after" }
765+
746766 override string toString ( ) { result = "After " + n .toString ( ) }
747767 }
748768
@@ -756,6 +776,8 @@ module Make0<LocationSig Location, AstSig<Location> Ast> {
756776
757777 NormalSuccessor getSuccessorType ( ) { additionalNode ( n , tag , result ) }
758778
779+ override string getIdTag ( ) { result = "add. " + tag }
780+
759781 override string toString ( ) { result = tag + " " + n .toString ( ) }
760782 }
761783
@@ -768,6 +790,8 @@ module Make0<LocationSig Location, AstSig<Location> Ast> {
768790
769791 override AstNode getAstNode ( ) { result = c }
770792
793+ override string getIdTag ( ) { result = "entry" }
794+
771795 override string toString ( ) { result = "Entry" }
772796 }
773797
@@ -782,6 +806,12 @@ module Make0<LocationSig Location, AstSig<Location> Ast> {
782806
783807 override AstNode getAstNode ( ) { result = c }
784808
809+ override string getIdTag ( ) {
810+ normal = true and result = "exit-normal"
811+ or
812+ normal = false and result = "exit-exc"
813+ }
814+
785815 override string toString ( ) {
786816 normal = true and result = "Normal Exit"
787817 or
@@ -809,6 +839,8 @@ module Make0<LocationSig Location, AstSig<Location> Ast> {
809839
810840 override AstNode getAstNode ( ) { result = c }
811841
842+ override string getIdTag ( ) { result = "exit" }
843+
812844 override string toString ( ) { result = "Exit" }
813845 }
814846
0 commit comments