mbeckerle commented on code in PR #806:
URL: https://github.com/apache/daffodil/pull/806#discussion_r910369554


##########
daffodil-runtime1/src/main/scala/org/apache/daffodil/debugger/InteractiveDebugger.scala:
##########
@@ -1595,7 +1595,22 @@ class InteractiveDebugger(runner: 
InteractiveDebuggerRunner, eCompilers: Express
         val desc = "display the current Daffodil " + name
         val longDesc = desc
         def act(args: Seq[String], state: ParseOrUnparseState, processor: 
Processor): DebugState.Type = {
-          debugPrintln("%s: %s".format(name, processor.toBriefXML(2))) // only 
2 levels of output, please!
+          state match {
+            case pstate: PState => {
+              if (name == "parser") {
+                debugPrintln("%s: %s".format(name, processor.toBriefXML(2)))
+              } else {
+                debugPrintln("unparser: not available")
+              }
+            }
+            case ustate: UState => {
+              if (name == "unparser") {
+                debugPrintln("%s: %s".format(name, processor.toBriefXML(2)))
+              } else {
+                debugPrintln("parser: not available")
+              }
+            }
+          }

Review Comment:
   Suggest we integrate this as is, but that next change should be another 
ticket, but might as well get it done right away while all fresh in mind. 
   
   Why would I suggest this?... because the world seems full of interrupts of 
context to me right now. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to