You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by ar...@apache.org on 2023/08/08 19:28:49 UTC
[daffodil-vscode] 03/03: Fix Parse.scala
This is an automated email from the ASF dual-hosted git repository.
arosien pushed a commit to branch issue/680/daffodil-3.5.0
in repository https://gitbox.apache.org/repos/asf/daffodil-vscode.git
commit ccc583b0386e22cdb5ce3322748465ef9d66c4ba
Author: Adam Rosien <ad...@rosien.net>
AuthorDate: Tue Aug 8 12:26:23 2023 -0700
Fix Parse.scala
---
.../org.apache.daffodil.debugger.dap/Parse.scala | 21 ++++++++++-----------
1 file changed, 10 insertions(+), 11 deletions(-)
diff --git a/debugger/src/main/scala/org.apache.daffodil.debugger.dap/Parse.scala b/debugger/src/main/scala/org.apache.daffodil.debugger.dap/Parse.scala
index 4ce7358..2a3f192 100644
--- a/debugger/src/main/scala/org.apache.daffodil.debugger.dap/Parse.scala
+++ b/debugger/src/main/scala/org.apache.daffodil.debugger.dap/Parse.scala
@@ -34,17 +34,16 @@ import java.nio.file._
import org.apache.commons.io.FileUtils
import org.apache.daffodil.debugger.dap.{BuildInfo => DAPBuildInfo}
import org.apache.daffodil.runtime1.debugger.Debugger
+import org.apache.daffodil.runtime1.infoset.{DIDocument, DIElement, InfosetElement, InfosetWalker}
+import org.apache.daffodil.runtime1.processors._
+import org.apache.daffodil.runtime1.processors.dfa.DFADelimiter
+import org.apache.daffodil.runtime1.processors.parsers._
import org.apache.daffodil.lib.exceptions.SchemaFileLocation
-import org.apache.daffodil.infoset._
-import org.apache.daffodil.processors.dfa.DFADelimiter
-import org.apache.daffodil.processors.parsers._
-import org.apache.daffodil.processors._
-import org.apache.daffodil.sapi.{Diagnostic, ValidationMode}
-import org.apache.daffodil.sapi.infoset.XMLTextInfosetOutputter
-import org.apache.daffodil.sapi.infoset.JsonInfosetOutputter
+import org.apache.daffodil.lib.util.Misc
+import org.apache.daffodil.sapi.ValidationMode
+import org.apache.daffodil.sapi.infoset._
import org.apache.daffodil.sapi.io.InputSourceDataInputStream
import org.apache.daffodil.tdml.TDML
-import org.apache.daffodil.util.Misc
import org.typelevel.log4cats.Logger
import org.typelevel.log4cats.slf4j.Slf4jLogger
import scala.collection.JavaConverters._
@@ -63,7 +62,7 @@ trait Parse {
object Parse {
implicit val logger: Logger[IO] = Slf4jLogger.getLogger
- case class Exception(diagnostics: List[Diagnostic])
+ case class Exception(diagnostics: List[org.apache.daffodil.sapi.Diagnostic])
extends RuntimeException(
diagnostics
.map(d => d.toString)
@@ -844,7 +843,7 @@ object Parse {
val hidden = event.state.withinHiddenNest
val childIndex = if (event.state.childPos != -1) Some(event.state.childPos) else None
val groupIndex = if (event.state.groupPos != -1) Some(event.state.groupPos) else None
- val occursIndex = if (event.state.arrayPos != -1) Some(event.state.arrayPos) else None
+ val occursIndex = if (event.state.arrayIterationPos != -1) Some(event.state.arrayIterationPos) else None
val foundDelimiter = for {
dpr <- event.state.delimitedParseResult.toScalaOption
dv <- dpr.matchedDelimiterValue.toScalaOption
@@ -986,7 +985,7 @@ object Parse {
schemaLocation: SchemaFileLocation,
pointsOfUncertainty: List[PointOfUncertainty],
delimiterStack: List[Delimiter],
- diagnostics: List[org.apache.daffodil.api.Diagnostic]
+ diagnostics: List[org.apache.daffodil.lib.api.Diagnostic]
) extends Event {
// PState is mutable, so we copy all the information we might need downstream.
def this(pstate: PState, isStepping: Boolean) =