JsSource

class JsSource(val srcDir: File, val projectDir: Path, val source: Source)
Companion:
object
class Object
trait Matchable
class Any

Value members

Concrete methods

def filePath: String
Returns:

the file path of the parsed file. If this file is the result of transpilation the original source file path is calculated from the corresponding sourcemap.

def getCode(node: Node): String
Returns:

the code of a node in the parsed file. If this file is the result of transpilation the original code is calculated from the corresponding sourcemap. Note: in this case, only the re-mapped starting line/column number are available. Hence, we extract only a fixed number of characters (max. until the end of the file).

def getColumn(node: Node): Option[Int]
Returns:

the column number of a node in the parsed file. If this file is the result of transpilation the original column number is calculated from the corresponding sourcemap.

def getLine(node: Node): Option[Int]
Returns:

the line number of a node in the parsed file. If this file is the result of transpilation the original line number is calculated from the corresponding sourcemap.

def getString(node: Node): String
def originalFilePath: String
Returns:

always the original file that was parsed. Might be a file that is the result of transpilation

Concrete fields

val projectDir: Path
val source: Source
val srcDir: File