Minor style updates.

This commit is contained in:
yukirij 2023-08-24 13:31:33 -07:00
parent 2a28d71fcf
commit b3b3f14758
2 changed files with 10 additions and 10 deletions

View File

@ -1,5 +1,5 @@
# Suzu Runtime / Notation
Szun is a library for defining, manipulating, and formatting structured, dynamically-typed data.
Szun is a library for defining, manipulating, and formatting structured, dynamic data.
## Runtime
The Szun runtime provides an interface for constructing and modfying data objects.
@ -8,7 +8,7 @@ The Szun runtime provides an interface for constructing and modfying data object
Szun uses a tag-prefixed, hierarchical, binary encoding with variable-sized values to produce serializations of reduced size.
## Language
Szun notation provides a human-readable format for structures and data to be defined.
Szun notation provides a human-readable format for structures and data to be defined.
The notation may be parsed and loaded at runtime or compiled directly into encoded format.
@ -32,7 +32,7 @@ While the runtime provides methods for directly acquring and releasing memory, i
|Varying|x01|--|Stores any data type|
|Boolean|x02|--|True or false|
|Natural|x10|--|Non-negative integers|
|Integer|x11|--|Integers|
|Integer|x11|--|Positive and negative whole numbers|
|Significant|x13|--|Fixed-precision, variable-magnitude numbers|
|Block|x1e|size|Constant-sized series of bytes|
|Sequence|x1f|--|Variable-sized series of bytes|

View File

@ -89,14 +89,14 @@ size_t type_alignment(size_t type_id)
size_t type = DB_TYPE.key(type_id);
switch(type) {
case Type::Tag::Null: return 0;
case Type::Tag::Null: return 0;
case Type::Tag::Boolean: return sizeof(Type::Boolean);
case Type::Tag::Natural: return sizeof(Type::Natural);
case Type::Tag::Integer: return sizeof(Type::Integer);
case Type::Tag::Significant: return sizeof(Type::Significant);
case Type::Tag::Block: return sizeof(uint8_t);
case Type::Tag::Array: return type_alignment(type_inner(type_id));
case Type::Tag::Boolean: return sizeof(Type::Boolean);
case Type::Tag::Natural: return sizeof(Type::Natural);
case Type::Tag::Integer: return sizeof(Type::Integer);
case Type::Tag::Significant: return sizeof(Type::Significant);
case Type::Tag::Block: return sizeof(uint8_t);
case Type::Tag::Array: return type_alignment(type_inner(type_id));
case Type::Tag::Varying:
case Type::Tag::Sequence: