-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Standard library documentation #1
Merged
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
f5f9757
Standard library empty pages
BenjaminNavarro a278feb
std/io doc update
BenjaminNavarro 13a3a0b
Minors fixes to std/io
BenjaminNavarro 2731052
str module documentation
BenjaminNavarro 2f71cce
Fixes in std/str
BenjaminNavarro cf60f71
Fixes in std/str
BenjaminNavarro 5c7aa1c
std/vec doc
BenjaminNavarro 885b202
Minor fixes
BenjaminNavarro 46db3bf
std/lang doc
BenjaminNavarro adb4199
Fix std/vec member functions ordering
BenjaminNavarro e1d2a5a
std/map doc
BenjaminNavarro fd7766b
Move all imports in the header for clearer examples
BenjaminNavarro cf1e023
std/fs doc
BenjaminNavarro 51954d1
Minor fixes to std/fs
BenjaminNavarro e298454
std.core doc outline
BenjaminNavarro caecfc7
Move part of std.str to std.core
BenjaminNavarro 8a190ee
Minor fix in std/fs
BenjaminNavarro 501f48b
std/os doc
BenjaminNavarro ebbae33
Add new sections
BenjaminNavarro 7bf552b
Fixing typos
BenjaminNavarro 0ae17fd
std/runtime doc
BenjaminNavarro c47681f
std/ptr doc
BenjaminNavarro c7cf6be
Merging std/runtime with std/sys
BenjaminNavarro 76ee8a4
Addressing PR comments
BenjaminNavarro 4b2bbef
std/builder doc
BenjaminNavarro 06be0a0
Addressing PR comments
BenjaminNavarro File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Conditionals |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Standard Library | ||
|
||
- [IO](./std/1-std-io.md) | ||
- [Lang](./std/2-std-lang.md) | ||
- [Strings](./std/3-std-strings.md) | ||
- [Vectors](./std/4-std-vectors.md) | ||
- [Maps](./std/5-std-maps.md) | ||
- [FS](./std/6-std-fs.md) | ||
- [OS](./std/7-std-os.md) | ||
- [Ptr](./std/8-std-ptr.md) | ||
- [Sys](./std/9-std-sys.md) | ||
- [Builder](./std/10-std-builder.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
# Core Functions | ||
|
||
- [Global](#global) | ||
- [Structures](#structures) | ||
- [All types](#all-types) | ||
- [nil](#nil) | ||
- [bool](#bool) | ||
- [int](#int) | ||
- [flt](#flt) | ||
- [string](#string) | ||
|
||
## Global | ||
| Function | Description | | ||
| :-------------: | ----------- | | ||
| `mload` | | | ||
| `import` | | | ||
| `__ismainsrc__` | | | ||
|
||
## Structures | ||
| Function | Description | | ||
| :------------: | ----------- | | ||
| `set_typename` | | | ||
|
||
|
||
## All types | ||
| Function | Description | | ||
| :------: | ----------- | | ||
| `==` | | | ||
| `!=` | | | ||
| `copy` | | | ||
| `str` | | | ||
|
||
## nil | ||
| Function | Description | | ||
| :------: | ----------- | | ||
| `==` | | | ||
| `!=` | | | ||
|
||
## bool | ||
| Function | Description | | ||
| :------: | ----------- | | ||
| `<` | | | ||
| `>` | | | ||
| `<=` | | | ||
| `>=` | | | ||
| `==` | | | ||
| `!=` | | | ||
| `!` | | | ||
|
||
## int | ||
| Function | Description | | ||
| :------: | ----------- | | ||
| `+` | | | ||
| `-` | | | ||
| `*` | | | ||
| `/` | | | ||
| `%` | | | ||
| `+=` | | | ||
| `-=` | | | ||
| `*=` | | | ||
| `/=` | | | ||
| `%=` | | | ||
| `**` | | | ||
| `++x` | | | ||
| `x++` | | | ||
| `--x` | | | ||
| `x--` | | | ||
| `u-` | | | ||
| `<` | | | ||
| `>` | | | ||
| `<=` | | | ||
| `>=` | | | ||
| `==` | | | ||
| `!=` | | | ||
|
||
## flt | ||
| Function | Description | | ||
| :------: | ----------- | | ||
| `+` | | | ||
| `-` | | | ||
| `*` | | | ||
| `/` | | | ||
| `+=` | | | ||
| `-=` | | | ||
| `*=` | | | ||
| `/=` | | | ||
| `++x` | | | ||
| `x++` | | | ||
| `--x` | | | ||
| `x--` | | | ||
| `u-` | | | ||
| `round` | | | ||
| `<` | | | ||
| `>` | | | ||
| `<=` | | | ||
| `>=` | | | ||
| `==` | | | ||
| `!=` | | | ||
|
||
## string | ||
| Function | Description | | ||
| :----------------------: | -------------------------------------------------------------- | | ||
| `+` | | | ||
| `*` | | | ||
| `+=` | | | ||
| `*=` | | | ||
| `<` | | | ||
| `<=` | | | ||
| `>=` | | | ||
| `==` | | | ||
| `!=` | | | ||
| `at(idx: int) -> string` | Returns the character at index `idx`, or `nil` if out of range | | ||
| `[idx: int] -> string` | Returns the character at index `idx`, or `nil` if out of range | | ||
|
||
Examples: | ||
``` | ||
let io = import('std/io'); | ||
let hello = 'hello!'; | ||
io.println(hello.at(0)); | ||
io.println(hello[6]); | ||
``` | ||
|
||
Output: | ||
``` | ||
h | ||
(nil) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
umm...
(nil)
should have been!
andh
should be as it is 😛There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤦