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 package documentBuilder
typealias FileName = String public typealias FileName = String
/** /**
* Node of dependency graph. * Node of dependency graph.
@ -10,7 +10,7 @@ typealias FileName = String
* @property mdAst - AST tree of current file. * @property mdAst - AST tree of current file.
* @property dependencies - list of tail end adjacent to this node (dependencies of current file to be resolved). * @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 mdAst: MdAstRoot,
val dependencies: List<DependencyGraphEdge> val dependencies: List<DependencyGraphEdge>
) )
@ -18,7 +18,7 @@ data class DependencyGraphNode(
/** /**
* Interface of all dependency edges. * 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 dependentNode - iterator to a dependent node, i.e. node of part of document with include commands
* @property includeList - list of files to be included. * @property includeList - list of files to be included.
*/ */
data class IncludeDependency( public data class IncludeDependency(
val parentNode: MdAstParent, val parentNode: MdAstParent,
val dependentNode: Iterator<MdAstElement>, val dependentNode: Iterator<MdAstElement>,
val includeList: List<FileName> 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. * @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> val nodes: Map<FileName, DependencyGraphNode>
) )

View File

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