aboutsummaryrefslogtreecommitdiff
path: root/core/container
diff options
context:
space:
mode:
authorgingerBill <gingerBill@users.noreply.github.com>2024-09-04 21:37:48 +0100
committerGitHub <noreply@github.com>2024-09-04 21:37:48 +0100
commita4fd0c133e824e349f830cad171d46fc210faab4 (patch)
tree8c869bc49609d68c5cd9e4e53a2b2f03b92f6297 /core/container
parentce018b4e6fc21356f5236449d90712fc5d0adc3e (diff)
parent288312a8126d71fae26c9d62a8cd342d830e1c5f (diff)
Merge pull request #4191 from laytan/improve-package-doc-comments
core: improve package doc comments for the documentation generator
Diffstat (limited to 'core/container')
-rw-r--r--core/container/bit_array/doc.odin8
-rw-r--r--core/container/intrusive/list/doc.odin15
2 files changed, 13 insertions, 10 deletions
diff --git a/core/container/bit_array/doc.odin b/core/container/bit_array/doc.odin
index 77e1904a8..36bf90002 100644
--- a/core/container/bit_array/doc.odin
+++ b/core/container/bit_array/doc.odin
@@ -1,8 +1,8 @@
/*
The Bit Array can be used in several ways:
-- By default you don't need to instantiate a Bit Array:
-
+By default you don't need to instantiate a Bit Array.
+Example:
package test
import "core:fmt"
@@ -22,8 +22,8 @@ The Bit Array can be used in several ways:
destroy(&bits)
}
-- A Bit Array can optionally allow for negative indices, if the minimum value was given during creation:
-
+A Bit Array can optionally allow for negative indices, if the minimum value was given during creation.
+Example:
package test
import "core:fmt"
diff --git a/core/container/intrusive/list/doc.odin b/core/container/intrusive/list/doc.odin
index 1a5a12f49..155f1dfe2 100644
--- a/core/container/intrusive/list/doc.odin
+++ b/core/container/intrusive/list/doc.odin
@@ -1,22 +1,22 @@
/*
Package list implements an intrusive doubly-linked list.
-An intrusive container requires a `Node` to be embedded in your own structure, like this:
-
+An intrusive container requires a `Node` to be embedded in your own structure, like this.
+Example:
My_String :: struct {
node: list.Node,
value: string,
}
-Embedding the members of a `list.Node` in your structure with the `using` keyword is also allowed:
-
+Embedding the members of a `list.Node` in your structure with the `using` keyword is also allowed.
+Example:
My_String :: struct {
using node: list.Node,
value: string,
}
-Here is a full example:
-
+Here is a full example.
+Example:
package test
import "core:fmt"
@@ -42,5 +42,8 @@ Here is a full example:
value: string,
}
+Output:
+ Hello
+ World
*/
package container_intrusive_list