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}
|
||||
println(typeName, parentMod, interfaces)
|
||||
|
||||
return dps
|
||||
}
|
||||
@ -325,7 +326,7 @@ provided by Hilbish.
|
||||
|
||||
os.Mkdir("emmyLuaDocs", 0777)
|
||||
|
||||
dirs := []string{"./util", "./"}
|
||||
dirs := []string{"./", "./util"}
|
||||
filepath.Walk("golibs/", func (path string, info os.FileInfo, err error) error {
|
||||
if !info.IsDir() {
|
||||
return nil
|
||||
@ -436,6 +437,16 @@ provided by Hilbish.
|
||||
interfaceModules[modname].Types = append(interfaceModules[modname].Types, piece)
|
||||
}
|
||||
|
||||
println(mod)
|
||||
fmt.Println(filteredTypePieces)
|
||||
if newDoc, ok := docs[mod]; ok {
|
||||
println("fuck")
|
||||
oldMod := docs[mod]
|
||||
newDoc.Types = append(filteredTypePieces, oldMod.Types...)
|
||||
newDoc.Docs = append(filteredPieces, oldMod.Docs...)
|
||||
|
||||
docs[mod] = newDoc
|
||||
} else {
|
||||
docs[mod] = module{
|
||||
Types: filteredTypePieces,
|
||||
Docs: filteredPieces,
|
||||
@ -446,6 +457,7 @@ provided by Hilbish.
|
||||
Fields: docPieceTag("field", tags),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for key, mod := range interfaceModules {
|
||||
docs[key] = *mod
|
||||
|
@ -448,6 +448,32 @@ Will return the path of the binary, or a basename if it's a commander.
|
||||
|
||||
</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>
|
||||
<div id='runnerMode'>
|
||||
<h4 class='heading'>
|
||||
|
@ -2,28 +2,6 @@
|
||||
|
||||
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.
|
||||
--- @param alias string
|
||||
--- @param cmd string
|
||||
@ -234,4 +212,26 @@ function hilbish.timers.create(type, time, callback) end
|
||||
--- Retrieves a timer via its ID.
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user