From b3b3f147588da864e14d2c76a36cb6f3d92b637b Mon Sep 17 00:00:00 2001 From: yukirij Date: Thu, 24 Aug 2023 13:31:33 -0700 Subject: [PATCH] Minor style updates. --- README.md | 6 +++--- src/runtime/lib.cc | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 9fc69d5..010d838 100644 --- a/README.md +++ b/README.md @@ -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| diff --git a/src/runtime/lib.cc b/src/runtime/lib.cc index 98cf4f4..bddb332 100644 --- a/src/runtime/lib.cc +++ b/src/runtime/lib.cc @@ -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: