All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.joern.x2cpg.astgen.package.scala Maven / Gradle / Ivy

There is a newer version: 4.0.131
Show newest version
package io.joern.x2cpg

import ujson.Value

import scala.Option

package object astgen {

  /** The base components of a JSON node.
    */
  trait BaseNodeInfo[T] {
    def node: T
    def json: Value
    def code: String
    def lineNumber: Option[Int]
    def columnNumber: Option[Int]
    def lineNumberEnd: Option[Int]
    def columnNumberEnd: Option[Int]
  }

  /** The basic components of the results from parsing the JSON AST.
    */
  trait BaseParserResult {
    def filename: String
    def fullPath: String
    def json: Value
    def fileContent: String
  }

  /** The default parser result. A minimal implementation of BaseParserResult
    *
    * @param filename
    *   the relative filename
    * @param fullPath
    *   the absolute file path
    * @param json
    *   the deserialized JSON content.
    * @param fileContent
    *   the raw file contents.
    */
  case class ParserResult(filename: String, fullPath: String, json: Value, var fileContent: String)
      extends BaseParserResult

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy