transform into odin-site parsable format

This commit is contained in:
Jon Lipstate
2023-03-27 22:00:53 -07:00
parent bf82c40964
commit f5d66bcb6f
6 changed files with 1314 additions and 641 deletions
+4 -4
View File
@@ -12,10 +12,10 @@ Ascii_Set :: distinct [8]u32
/*
Creates an Ascii_Set with unique characters from the input string.
Inputs:
**Inputs**
- chars: A string containing characters to include in the Ascii_Set.
Returns:
**Returns**
- as: An Ascii_Set with unique characters from the input string.
- ok: false if any character in the input string is not a valid ASCII character.
*/
@@ -33,11 +33,11 @@ ascii_set_make :: proc(chars: string) -> (as: Ascii_Set, ok: bool) #no_bounds_ch
/*
Determines if a given char is contained within an Ascii_Set.
Inputs:
**Inputs**
- as: The Ascii_Set to search.
- c: The char to check for in the Ascii_Set.
Returns: A boolean indicating if the byte is contained in the Ascii_Set (true) or not (false).
**Returns** A boolean indicating if the byte is contained in the Ascii_Set (true) or not (false).
*/
ascii_set_contains :: proc(as: Ascii_Set, c: byte) -> bool #no_bounds_check {
return as[c>>5] & (1<<(c&31)) != 0