@@ -2542,6 +2542,7 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
2542
2542
/** Gets the `FlowState` of this node. */
2543
2543
abstract FlowState getState ( ) ;
2544
2544
2545
+ /** Gets a textual representation of this element. */
2545
2546
abstract string toString ( ) ;
2546
2547
2547
2548
predicate isSource ( ) { none ( ) }
@@ -2594,9 +2595,39 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
2594
2595
2595
2596
override FlowState getState ( ) { result = state }
2596
2597
2597
- override string toString ( ) {
2598
+ private string ppType ( ) {
2599
+ exists ( string ppt | ppt = t .toString ( ) |
2600
+ if ppt = "" then result = "" else result = " : " + ppt
2601
+ )
2602
+ }
2603
+
2604
+ private string ppAp ( ) {
2605
+ exists ( string s | s = ap .toString ( ) |
2606
+ if s = "" then result = "" else result = " " + s
2607
+ )
2608
+ }
2609
+
2610
+ private string ppCtx ( ) { result = " <" + cc + ">" }
2611
+
2612
+ private string ppSummaryCtx ( ) {
2613
+ summaryCtx instanceof TParamNodeNone and result = ""
2614
+ or
2615
+ exists ( ParamNode p , Ap argAp0 |
2616
+ summaryCtx = TParamNodeSome ( p ) and argAp = apSome ( argAp0 )
2617
+ |
2618
+ result = " <" + p + " : " + argT + " " + argAp0 + ">"
2619
+ )
2620
+ }
2621
+
2622
+ override string toString ( ) { result = node .toString ( ) + this .ppType ( ) + this .ppAp ( ) }
2623
+
2624
+ /**
2625
+ * Gets a textual representation of this element, including a textual
2626
+ * representation of the call context.
2627
+ */
2628
+ string toStringWithContext ( ) {
2598
2629
result =
2599
- node .toString ( ) + " " + cc . toString ( ) + " " + t . toString ( ) + " " + ap . toString ( )
2630
+ node .toString ( ) + this . ppType ( ) + this . ppAp ( ) + this . ppCtx ( ) + this . ppSummaryCtx ( )
2600
2631
}
2601
2632
2602
2633
override predicate isSource ( ) {
0 commit comments