feat: Adds extension to argument parser's command configuration
This commit is contained in:
14
Sources/CliDoc/Nodes/Abstract.swift
Normal file
14
Sources/CliDoc/Nodes/Abstract.swift
Normal file
@@ -0,0 +1,14 @@
|
||||
import CliDocCore
|
||||
|
||||
public struct Abstract<Content: TextNode>: TextNode {
|
||||
@usableFromInline
|
||||
let content: Content
|
||||
|
||||
public init(@TextBuilder content: () -> Content) {
|
||||
self.content = content()
|
||||
}
|
||||
|
||||
public var body: some TextNode {
|
||||
content
|
||||
}
|
||||
}
|
||||
14
Sources/CliDoc/Nodes/Discussion.swift
Normal file
14
Sources/CliDoc/Nodes/Discussion.swift
Normal file
@@ -0,0 +1,14 @@
|
||||
import CliDocCore
|
||||
|
||||
public struct Discussion<Content: TextNode>: TextNode {
|
||||
@usableFromInline
|
||||
let content: Content
|
||||
|
||||
public init(@TextBuilder content: () -> Content) {
|
||||
self.content = content()
|
||||
}
|
||||
|
||||
public var body: some TextNode {
|
||||
content
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
import CliDocCore
|
||||
import Rainbow
|
||||
|
||||
// TODO: Use labeled content.
|
||||
public struct Note<Label: TextNode, Content: TextNode>: TextNode {
|
||||
@usableFromInline
|
||||
let label: Label
|
||||
|
||||
14
Sources/CliDoc/Nodes/Usage.swift
Normal file
14
Sources/CliDoc/Nodes/Usage.swift
Normal file
@@ -0,0 +1,14 @@
|
||||
import CliDocCore
|
||||
|
||||
public struct Usage<Content: TextNode>: TextNode {
|
||||
@usableFromInline
|
||||
let content: Content
|
||||
|
||||
public init(@TextBuilder content: () -> Content) {
|
||||
self.content = content()
|
||||
}
|
||||
|
||||
public var body: some TextNode {
|
||||
content
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user