mirror of
https://github.com/Hilbis/Hilbish
synced 2025-04-20 20:43:23 +00:00
fix(docs): add back sink
This commit is contained in:
parent
9caecdc1a4
commit
702c75c0c2
@ -204,6 +204,7 @@ func setupDocType(mod string, typ *doc.Type) *docPiece {
|
|||||||
}
|
}
|
||||||
|
|
||||||
typeTable[strings.ToLower(typeName)] = []string{parentMod, interfaces}
|
typeTable[strings.ToLower(typeName)] = []string{parentMod, interfaces}
|
||||||
|
println(typeName, parentMod, interfaces)
|
||||||
|
|
||||||
return dps
|
return dps
|
||||||
}
|
}
|
||||||
@ -325,7 +326,7 @@ provided by Hilbish.
|
|||||||
|
|
||||||
os.Mkdir("emmyLuaDocs", 0777)
|
os.Mkdir("emmyLuaDocs", 0777)
|
||||||
|
|
||||||
dirs := []string{"./util", "./"}
|
dirs := []string{"./", "./util"}
|
||||||
filepath.Walk("golibs/", func (path string, info os.FileInfo, err error) error {
|
filepath.Walk("golibs/", func (path string, info os.FileInfo, err error) error {
|
||||||
if !info.IsDir() {
|
if !info.IsDir() {
|
||||||
return nil
|
return nil
|
||||||
@ -436,14 +437,25 @@ provided by Hilbish.
|
|||||||
interfaceModules[modname].Types = append(interfaceModules[modname].Types, piece)
|
interfaceModules[modname].Types = append(interfaceModules[modname].Types, piece)
|
||||||
}
|
}
|
||||||
|
|
||||||
docs[mod] = module{
|
println(mod)
|
||||||
Types: filteredTypePieces,
|
fmt.Println(filteredTypePieces)
|
||||||
Docs: filteredPieces,
|
if newDoc, ok := docs[mod]; ok {
|
||||||
ShortDescription: shortDesc,
|
println("fuck")
|
||||||
Description: strings.Join(desc, "\n"),
|
oldMod := docs[mod]
|
||||||
HasInterfaces: hasInterfaces,
|
newDoc.Types = append(filteredTypePieces, oldMod.Types...)
|
||||||
Properties: docPieceTag("property", tags),
|
newDoc.Docs = append(filteredPieces, oldMod.Docs...)
|
||||||
Fields: docPieceTag("field", tags),
|
|
||||||
|
docs[mod] = newDoc
|
||||||
|
} else {
|
||||||
|
docs[mod] = module{
|
||||||
|
Types: filteredTypePieces,
|
||||||
|
Docs: filteredPieces,
|
||||||
|
ShortDescription: shortDesc,
|
||||||
|
Description: strings.Join(desc, "\n"),
|
||||||
|
HasInterfaces: hasInterfaces,
|
||||||
|
Properties: docPieceTag("property", tags),
|
||||||
|
Fields: docPieceTag("field", tags),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -448,6 +448,32 @@ Will return the path of the binary, or a basename if it's a commander.
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
## Types
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
## Sink
|
||||||
|
A sink is a structure that has input and/or output to/from a desination.
|
||||||
|
|
||||||
|
### Methods
|
||||||
|
#### autoFlush(auto)
|
||||||
|
Sets/toggles the option of automatically flushing output.
|
||||||
|
A call with no argument will toggle the value.
|
||||||
|
|
||||||
|
#### flush()
|
||||||
|
Flush writes all buffered input to the sink.
|
||||||
|
|
||||||
|
#### read() -> string
|
||||||
|
Reads a liine of input from the sink.
|
||||||
|
|
||||||
|
#### readAll() -> string
|
||||||
|
Reads all input from the sink.
|
||||||
|
|
||||||
|
#### write(str)
|
||||||
|
Writes data to a sink.
|
||||||
|
|
||||||
|
#### writeln(str)
|
||||||
|
Writes data to a sink with a newline at the end.
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
<div id='runnerMode'>
|
<div id='runnerMode'>
|
||||||
<h4 class='heading'>
|
<h4 class='heading'>
|
||||||
|
@ -2,28 +2,6 @@
|
|||||||
|
|
||||||
local hilbish = {}
|
local hilbish = {}
|
||||||
|
|
||||||
--- Sets/toggles the option of automatically flushing output.
|
|
||||||
--- A call with no argument will toggle the value.
|
|
||||||
--- @param auto boolean|nil
|
|
||||||
function hilbish:autoFlush(auto) end
|
|
||||||
|
|
||||||
--- Flush writes all buffered input to the sink.
|
|
||||||
function hilbish:flush() end
|
|
||||||
|
|
||||||
--- Reads a liine of input from the sink.
|
|
||||||
--- @returns string
|
|
||||||
function hilbish:read() end
|
|
||||||
|
|
||||||
--- Reads all input from the sink.
|
|
||||||
--- @returns string
|
|
||||||
function hilbish:readAll() end
|
|
||||||
|
|
||||||
--- Writes data to a sink.
|
|
||||||
function hilbish:write(str) end
|
|
||||||
|
|
||||||
--- Writes data to a sink with a newline at the end.
|
|
||||||
function hilbish:writeln(str) end
|
|
||||||
|
|
||||||
--- This is an alias (ha) for the [hilbish.alias](../#alias) function.
|
--- This is an alias (ha) for the [hilbish.alias](../#alias) function.
|
||||||
--- @param alias string
|
--- @param alias string
|
||||||
--- @param cmd string
|
--- @param cmd string
|
||||||
@ -234,4 +212,26 @@ function hilbish.timers.create(type, time, callback) end
|
|||||||
--- Retrieves a timer via its ID.
|
--- Retrieves a timer via its ID.
|
||||||
function hilbish.timers.get(id) end
|
function hilbish.timers.get(id) end
|
||||||
|
|
||||||
|
--- Sets/toggles the option of automatically flushing output.
|
||||||
|
--- A call with no argument will toggle the value.
|
||||||
|
--- @param auto boolean|nil
|
||||||
|
function hilbish:autoFlush(auto) end
|
||||||
|
|
||||||
|
--- Flush writes all buffered input to the sink.
|
||||||
|
function hilbish:flush() end
|
||||||
|
|
||||||
|
--- Reads a liine of input from the sink.
|
||||||
|
--- @returns string
|
||||||
|
function hilbish:read() end
|
||||||
|
|
||||||
|
--- Reads all input from the sink.
|
||||||
|
--- @returns string
|
||||||
|
function hilbish:readAll() end
|
||||||
|
|
||||||
|
--- Writes data to a sink.
|
||||||
|
function hilbish:write(str) end
|
||||||
|
|
||||||
|
--- Writes data to a sink with a newline at the end.
|
||||||
|
function hilbish:writeln(str) end
|
||||||
|
|
||||||
return hilbish
|
return hilbish
|
||||||
|
Loading…
x
Reference in New Issue
Block a user