diff --git a/cmd/docgen/docgen.go b/cmd/docgen/docgen.go index 4961a648..202dffab 100644 --- a/cmd/docgen/docgen.go +++ b/cmd/docgen/docgen.go @@ -86,6 +86,7 @@ var prefix = map[string]string{ "terminal": "term", "snail": "snail", "readline": "rl", + "yarn": "yarn", } func getTagsAndDocs(docs string) (map[string][]tag, []string) { diff --git a/docs/api/yarn.md b/docs/api/yarn.md index 3f5420c9..a9602209 100644 --- a/docs/api/yarn.md +++ b/docs/api/yarn.md @@ -22,6 +22,27 @@ local t = yarn.thread(print) t 'printing from another lua state!' ``` +## Functions +||| +|----|----| +|thread(fun) -> @Thread|Creates a new, fresh Yarn thread.| + +
+
+

+yarn.thread(fun) -> Thread + + + +

+ +Creates a new, fresh Yarn thread. +`fun` is the function that will run in the thread. + +#### Parameters +This function has no parameters. +
+ ## Types
diff --git a/emmyLuaDocs/yarn.lua b/emmyLuaDocs/yarn.lua index 1b0961ed..3fa4f431 100644 --- a/emmyLuaDocs/yarn.lua +++ b/emmyLuaDocs/yarn.lua @@ -2,4 +2,8 @@ local yarn = {} +--- Creates a new, fresh Yarn thread. +--- `fun` is the function that will run in the thread. +function yarn.thread(fun) end + return yarn