SNRK-70: visibility specificators are added

This commit is contained in:
liubar.pa 2023-05-01 14:48:34 +03:00
parent 417d90b842
commit fd45104a7e
2 changed files with 17 additions and 17 deletions

View File

@ -1,6 +1,6 @@
package documentBuilder
typealias FileName = String
public typealias FileName = String
/**
* Node of dependency graph.
@ -10,7 +10,7 @@ typealias FileName = String
* @property mdAst - AST tree of current file.
* @property dependencies - list of tail end adjacent to this node (dependencies of current file to be resolved).
*/
data class DependencyGraphNode(
public data class DependencyGraphNode(
val mdAst: MdAstRoot,
val dependencies: List<DependencyGraphEdge>
)
@ -18,7 +18,7 @@ data class DependencyGraphNode(
/**
* Interface of all dependency edges.
*/
sealed interface DependencyGraphEdge {
public sealed interface DependencyGraphEdge {
}
/**
@ -28,7 +28,7 @@ sealed interface DependencyGraphEdge {
* @property dependentNode - iterator to a dependent node, i.e. node of part of document with include commands
* @property includeList - list of files to be included.
*/
data class IncludeDependency(
public data class IncludeDependency(
val parentNode: MdAstParent,
val dependentNode: Iterator<MdAstElement>,
val includeList: List<FileName>
@ -39,6 +39,6 @@ data class IncludeDependency(
*
* @property nodes - map of nodes, where you can find DependencyGraphNode of file by its name.
*/
data class DependencyGraph(
public data class DependencyGraph(
val nodes: Map<FileName, DependencyGraphNode>
)

View File

@ -6,10 +6,10 @@ import com.fasterxml.jackson.annotation.JsonSubTypes
import com.fasterxml.jackson.annotation.JsonTypeInfo
@Serializable
data class Point(val line: Int, val column: Int, val offset: Int)
public data class Point(val line: Int, val column: Int, val offset: Int)
@Serializable
data class Position(val start: Point, val end: Point)
public data class Position(val start: Point, val end: Point)
@JsonTypeInfo(
use = JsonTypeInfo.Id.NAME,
@ -27,18 +27,18 @@ data class Position(val start: Point, val end: Point)
)
@Serializable
sealed interface MdAstElement{
abstract var position: Position
public sealed interface MdAstElement{
public abstract var position: Position
}
@Serializable
sealed interface MdAstParent: MdAstElement{
var children: List<MdAstElement>
public sealed interface MdAstParent: MdAstElement{
public var children: List<MdAstElement>
}
@Serializable
@SerialName("root")
data class MdAstRoot(
public data class MdAstRoot(
override var children: List<MdAstElement>,
override var position: Position
): MdAstParent
@ -46,7 +46,7 @@ data class MdAstRoot(
@Serializable
@SerialName("paragraph")
data class MdAstParagraph(
public data class MdAstParagraph(
override var children: List<MdAstElement>,
override var position: Position
): MdAstParent
@ -54,14 +54,14 @@ data class MdAstParagraph(
@Serializable
@SerialName("text")
data class MdAstText(
public data class MdAstText(
val value: String,
override var position: Position
): MdAstElement
@Serializable
@SerialName("heading")
data class MdAstHeading(
public data class MdAstHeading(
val depth: Int,
override var children: List<MdAstElement>,
override var position: Position
@ -69,7 +69,7 @@ data class MdAstHeading(
@Serializable
@SerialName("code")
data class MdAstCode(
public data class MdAstCode(
var lang: String? = null,
var meta: String? = null,
var value: String,
@ -78,7 +78,7 @@ data class MdAstCode(
@Serializable
@SerialName("blockquote")
data class MdAstBlockquote(
public data class MdAstBlockquote(
override var children: List<MdAstElement>,
override var position: Position
): MdAstParent