diff --git a/.vitepress/config.ts b/.vitepress/config.ts index 86ae3a9..52c49e6 100644 --- a/.vitepress/config.ts +++ b/.vitepress/config.ts @@ -51,7 +51,7 @@ export default defineConfig({ nav: [ { text: 'Manual', link: '/' }, - { text: 'Standard Library', link: '/standard-library/' }, + { text: 'Standard Library', link: '/std/' }, { text: 'API', link: '/api/' }, ], @@ -284,7 +284,7 @@ export default defineConfig({ }, { items: [ - { text: 'Standard Library', link: '/standard-library/' }, + { text: 'Standard Library', link: '/std/' }, { text: 'End', link: '/end' }, ] }, @@ -363,84 +363,84 @@ export default defineConfig({ } ], - '/standard-library/': [ + '/std/': [ { text: 'Standard Library', - link: '/standard-library/', + link: '/std/', items: [ - { text: 'builtin', link: '/standard-library/builtin' }, - { text: 'std::conv', link: '/standard-library/std-conv' }, + { text: 'builtin', link: '/std/builtin' }, + { text: 'std::conv', link: '/std/conv' }, { text: 'std::debug', - link: '/standard-library/std-debug', + link: '/std/debug', items: [ - { text: 'std::debug::assert', link: '/standard-library/std-debug-assert' } + { text: 'std::debug::assert', link: '/std/debug-assert' } ], }, - { text: 'std::env', link: '/standard-library/std-env' }, - { text: 'std::errors', link: '/standard-library/std-errors' }, - { text: 'std::fmt', link: '/standard-library/std-fmt' }, + { text: 'std::env', link: '/std/std-env' }, + { text: 'std::errors', link: '/std/errors' }, + { text: 'std::fmt', link: '/std/fmt' }, { text: 'std::fs', - link: '/standard-library/std-fs', + link: '/std/fs', items: [ - { text: 'std::fs::path', link: '/standard-library/std-fs-path' } + { text: 'std::fs::path', link: '/std/fs-path' } ], }, - { text: 'std::io', link: '/standard-library/std-io' }, + { text: 'std::io', link: '/std/io' }, { text: 'std::jule', - link: '/standard-library/std-jule', + link: '/std/jule', items: [ - { text: 'std::jule::ast', link: '/standard-library/std-jule-ast' }, - { text: 'std::jule::build', link: '/standard-library/std-jule-build' }, + { text: 'std::jule::ast', link: '/std/jule-ast' }, + { text: 'std::jule::build', link: '/std/jule-build' }, { text: 'std::jule::constant', - link: '/standard-library/std-jule-constant', + link: '/std/jule-constant', items: [ - { text: 'std::jule::constant::lit', link: '/standard-library/std-jule-constant-lit' } + { text: 'std::jule::constant::lit', link: '/std/jule-constant-lit' } ] }, - { text: 'std::jule::integrated', link: '/standard-library/std-jule-integrated' }, - { text: 'std::jule::lex', link: '/standard-library/std-jule-lex' }, - { text: 'std::jule::parser', link: '/standard-library/std-jule-parser' }, - { text: 'std::jule::sema', link: '/standard-library/std-jule-sema' }, - { text: 'std::jule::types', link: '/standard-library/std-jule-types' }, + { text: 'std::jule::integrated', link: '/std/jule-integrated' }, + { text: 'std::jule::lex', link: '/std/jule-lex' }, + { text: 'std::jule::parser', link: '/std/jule-parser' }, + { text: 'std::jule::sema', link: '/std/jule-sema' }, + { text: 'std::jule::types', link: '/std/jule-types' }, ] }, { text: 'std::math', - link: '/standard-library/std-math', + link: '/std/math', items: [ - { text: 'std::math::bits', link:'/standard-library/std-math-bits' } + { text: 'std::math::bits', link:'/std/math-bits' } ], }, { text: 'std::mem', - link: '/standard-library/std-mem', + link: '/std/mem', items: [], }, - { text: 'std::process', link: '/standard-library/std-process' }, - { text: 'std::runtime', link: '/standard-library/std-runtime' }, + { text: 'std::process', link: '/std/process' }, + { text: 'std::runtime', link: '/std/runtime' }, { text: 'std::sync', - link: '/standard-library/std-sync', + link: '/std/sync', items: [ - { text: 'std::sync::atomic', link:'/standard-library/std-sync-atomic' } + { text: 'std::sync::atomic', link:'/std/sync-atomic' } ], }, - { text: 'std::sys', link: '/standard-library/std-sys' }, - { text: 'std::thread', link: '/standard-library/std-thread', }, - { text: 'std::time', link: '/standard-library/std-time', }, + { text: 'std::sys', link: '/std/sys' }, + { text: 'std::thread', link: '/std/thread', }, + { text: 'std::time', link: '/std/time', }, { text: 'std::unicode', - link: '/standard-library/std-unicode', + link: '/std/unicode', items: [ - { text: 'std::unicode::utf16', link:'/standard-library/std-unicode-utf16' }, - { text: 'std::unicode::utf8', link:'/standard-library/std-unicode-utf8' }, + { text: 'std::unicode::utf16', link:'/std/unicode-utf16' }, + { text: 'std::unicode::utf8', link:'/std/unicode-utf8' }, ], }, - { text: 'std::vec', link: '/standard-library/std-vec' }, + { text: 'std::vec', link: '/std/vec' }, ], }, ] diff --git a/src/error-handling/panics.md b/src/error-handling/panics.md index d21f9c0..9511a7b 100644 --- a/src/error-handling/panics.md +++ b/src/error-handling/panics.md @@ -1,5 +1,5 @@ # Panics -Panics abruptly stop program execution and "abort" it. If you're talking about an issue that will cause the program to crash while executing, using panic would be a good choice. The panic function is the builtin function. See the [builtin documentations](/standard-library/builtin). +Panics abruptly stop program execution and "abort" it. If you're talking about an issue that will cause the program to crash while executing, using panic would be a good choice. The panic function is the builtin function. See the [builtin documentations](/std/builtin). For example: ```jule diff --git a/src/memory/immutability.md b/src/memory/immutability.md index beb47e5..89ec97b 100644 --- a/src/memory/immutability.md +++ b/src/memory/immutability.md @@ -139,7 +139,7 @@ fn main() { In the example above, an immutable trait contains a mutable type `&Circle`. We can get this by casting and change the result of the `area` method by changing the `r` field. This is because the `&Circle` instance it stores has interior mutability. ## Cloning -You may need to have deep copies for various reasons (for example assigning mutable struct in immutable variable to mutable variable). You can use the built-in `clone` function to do this. The `clone` function only supports some data types as input. To find out about them, you can refer to the [relevant documents](/standard-library/builtin). +You may need to have deep copies for various reasons (for example assigning mutable struct in immutable variable to mutable variable). You can use the built-in `clone` function to do this. The `clone` function only supports some data types as input. To find out about them, you can refer to the [relevant documents](/std/builtin). Cloning supported types and copy methods: - Numeric Types\ diff --git a/src/memory/management/index.md b/src/memory/management/index.md index 302ab0a..183db74 100644 --- a/src/memory/management/index.md +++ b/src/memory/management/index.md @@ -31,7 +31,7 @@ You can't use as reference these types: - Array ### Initialization -The built-in `new` function is used to make the reference. Please refer to the [builtin](/standard-library/builtin) library documentation for this function. +The built-in `new` function is used to make the reference. Please refer to the [builtin](/std/builtin) library documentation for this function. It can be used in two ways. The first type allows you to get only one reference, but that reference is an uninitialized reference (aka nil reference), meaning it does not point to any allocation and does not perform reference counting. diff --git a/src/standard-library/builtin.md b/src/std/builtin.md similarity index 100% rename from src/standard-library/builtin.md rename to src/std/builtin.md diff --git a/src/standard-library/std-conv.md b/src/std/conv.md similarity index 100% rename from src/standard-library/std-conv.md rename to src/std/conv.md diff --git a/src/standard-library/std-debug-assert.md b/src/std/debug-assert.md similarity index 100% rename from src/standard-library/std-debug-assert.md rename to src/std/debug-assert.md diff --git a/src/standard-library/std-debug.md b/src/std/debug.md similarity index 100% rename from src/standard-library/std-debug.md rename to src/std/debug.md diff --git a/src/standard-library/std-env.md b/src/std/env.md similarity index 100% rename from src/standard-library/std-env.md rename to src/std/env.md diff --git a/src/standard-library/std-errors.md b/src/std/errors.md similarity index 100% rename from src/standard-library/std-errors.md rename to src/std/errors.md diff --git a/src/standard-library/std-fmt.md b/src/std/fmt.md similarity index 100% rename from src/standard-library/std-fmt.md rename to src/std/fmt.md diff --git a/src/standard-library/std-fs-path.md b/src/std/fs-path.md similarity index 100% rename from src/standard-library/std-fs-path.md rename to src/std/fs-path.md diff --git a/src/standard-library/std-fs.md b/src/std/fs.md similarity index 100% rename from src/standard-library/std-fs.md rename to src/std/fs.md diff --git a/src/standard-library/index.md b/src/std/index.md similarity index 100% rename from src/standard-library/index.md rename to src/std/index.md diff --git a/src/standard-library/std-io.md b/src/std/io.md similarity index 100% rename from src/standard-library/std-io.md rename to src/std/io.md diff --git a/src/standard-library/std-jule-ast.md b/src/std/jule-ast.md similarity index 100% rename from src/standard-library/std-jule-ast.md rename to src/std/jule-ast.md diff --git a/src/standard-library/std-jule-build.md b/src/std/jule-build.md similarity index 100% rename from src/standard-library/std-jule-build.md rename to src/std/jule-build.md diff --git a/src/standard-library/std-jule-constant-lit.md b/src/std/jule-constant-lit.md similarity index 100% rename from src/standard-library/std-jule-constant-lit.md rename to src/std/jule-constant-lit.md diff --git a/src/standard-library/std-jule-constant.md b/src/std/jule-constant.md similarity index 100% rename from src/standard-library/std-jule-constant.md rename to src/std/jule-constant.md diff --git a/src/standard-library/std-jule-integrated.md b/src/std/jule-integrated.md similarity index 100% rename from src/standard-library/std-jule-integrated.md rename to src/std/jule-integrated.md diff --git a/src/standard-library/std-jule-lex.md b/src/std/jule-lex.md similarity index 100% rename from src/standard-library/std-jule-lex.md rename to src/std/jule-lex.md diff --git a/src/standard-library/std-jule-parser.md b/src/std/jule-parser.md similarity index 100% rename from src/standard-library/std-jule-parser.md rename to src/std/jule-parser.md diff --git a/src/standard-library/std-jule-sema.md b/src/std/jule-sema.md similarity index 100% rename from src/standard-library/std-jule-sema.md rename to src/std/jule-sema.md diff --git a/src/standard-library/std-jule-types.md b/src/std/jule-types.md similarity index 100% rename from src/standard-library/std-jule-types.md rename to src/std/jule-types.md diff --git a/src/standard-library/std-jule.md b/src/std/jule.md similarity index 100% rename from src/standard-library/std-jule.md rename to src/std/jule.md diff --git a/src/standard-library/std-math-bits.md b/src/std/math-bits.md similarity index 100% rename from src/standard-library/std-math-bits.md rename to src/std/math-bits.md diff --git a/src/standard-library/std-math.md b/src/std/math.md similarity index 100% rename from src/standard-library/std-math.md rename to src/std/math.md diff --git a/src/standard-library/std-mem.md b/src/std/mem.md similarity index 100% rename from src/standard-library/std-mem.md rename to src/std/mem.md diff --git a/src/standard-library/std-process.md b/src/std/process.md similarity index 100% rename from src/standard-library/std-process.md rename to src/std/process.md diff --git a/src/standard-library/std-runtime.md b/src/std/runtime.md similarity index 100% rename from src/standard-library/std-runtime.md rename to src/std/runtime.md diff --git a/src/standard-library/std-sync-atomic.md b/src/std/sync-atomic.md similarity index 100% rename from src/standard-library/std-sync-atomic.md rename to src/std/sync-atomic.md diff --git a/src/standard-library/std-sync.md b/src/std/sync.md similarity index 100% rename from src/standard-library/std-sync.md rename to src/std/sync.md diff --git a/src/standard-library/std-sys.md b/src/std/sys.md similarity index 100% rename from src/standard-library/std-sys.md rename to src/std/sys.md diff --git a/src/standard-library/std-thread.md b/src/std/thread.md similarity index 100% rename from src/standard-library/std-thread.md rename to src/std/thread.md diff --git a/src/standard-library/std-time.md b/src/std/time.md similarity index 100% rename from src/standard-library/std-time.md rename to src/std/time.md diff --git a/src/standard-library/std-unicode-utf16.md b/src/std/unicode-utf16.md similarity index 100% rename from src/standard-library/std-unicode-utf16.md rename to src/std/unicode-utf16.md diff --git a/src/standard-library/std-unicode-utf8.md b/src/std/unicode-utf8.md similarity index 99% rename from src/standard-library/std-unicode-utf8.md rename to src/std/unicode-utf8.md index 3022273..d8a3da0 100644 --- a/src/standard-library/std-unicode-utf8.md +++ b/src/std/unicode-utf8.md @@ -1,4 +1,4 @@ -# std::unicode::utf16 +# std::unicode::utf8 ## Globals ### `const RUNE_ERROR` The "error" rune or "Unicode replacement character" diff --git a/src/standard-library/std-unicode.md b/src/std/unicode.md similarity index 100% rename from src/standard-library/std-unicode.md rename to src/std/unicode.md diff --git a/src/standard-library/std-vec.md b/src/std/vec.md similarity index 100% rename from src/standard-library/std-vec.md rename to src/std/vec.md