From 55a5da266fb324c6b73d6b9acc1678b9691dd696 Mon Sep 17 00:00:00 2001 From: Randy Hollines Date: Sat, 17 Feb 2024 07:10:46 -0800 Subject: [PATCH] added optional 'in' keyword to `each` loops --- core/compiler/lib_src/lang.obs | 34 +++++++++++++++++----------------- core/compiler/lib_src/xml.obs | 6 +++--- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/core/compiler/lib_src/lang.obs b/core/compiler/lib_src/lang.obs index 2402deae0..fafb9047e 100644 --- a/core/compiler/lib_src/lang.obs +++ b/core/compiler/lib_src/lang.obs @@ -211,7 +211,7 @@ bundle System { @ignore-params @return compressed bytes ~# - function : CompressZlib(in : Byte[]) ~ Byte[] { + function : CompressZlib(input : Byte[]) ~ Byte[] { COMPRESS_ZLIB_BYTES; } @@ -220,7 +220,7 @@ bundle System { @ignore-params @return uncompressed bytes ~# - function : UncompressZlib(in : Byte[]) ~ Byte[] { + function : UncompressZlib(input : Byte[]) ~ Byte[] { UNCOMPRESS_ZLIB_BYTES; } @@ -229,7 +229,7 @@ bundle System { @ignore-params @return compressed bytes ~# - function : CompressGzip(in : Byte[]) ~ Byte[] { + function : CompressGzip(input : Byte[]) ~ Byte[] { COMPRESS_GZIP_BYTES; } @@ -238,7 +238,7 @@ bundle System { @ignore-params @return uncompressed bytes ~# - function : UncompressGzip(in : Byte[]) ~ Byte[] { + function : UncompressGzip(input : Byte[]) ~ Byte[] { UNCOMPRESS_GZIP_BYTES; } @@ -247,7 +247,7 @@ bundle System { @ignore-params @return compressed bytes ~# - function : CompressBr(in : Byte[]) ~ Byte[] { + function : CompressBr(input : Byte[]) ~ Byte[] { COMPRESS_BR_BYTES; } @@ -256,7 +256,7 @@ bundle System { @ignore-params @return uncompressed bytes ~# - function : UncompressBr(in : Byte[]) ~ Byte[] { + function : UncompressBr(input : Byte[]) ~ Byte[] { UNCOMPRESS_BR_BYTES; } @@ -265,7 +265,7 @@ bundle System { @ignore-params @return signed CRC32 ~# - function : CRC32(in : Byte[]) ~ Int { + function : CRC32(input :Byte[]) ~ Int { CRC32_BYTES; } @@ -2691,7 +2691,7 @@ bundle System { @param in array of primitives @return an array of references ~# - function : FromArray(in : Bool[]) ~ BoolRef[] { + function : FromArray(input : Bool[]) ~ BoolRef[] { out := BoolRef->New[input->Size()]; each(i : in) { @@ -2706,7 +2706,7 @@ bundle System { @param in array of references @return an array of primitives ~# - function : ToArray(in : BoolRef[]) ~ Bool[] { + function : ToArray(input : BoolRef[]) ~ Bool[] { out := Bool->New[input->Size()]; each(i : in) { @@ -2810,7 +2810,7 @@ bundle System { @param in array of primitives @return an array of references ~# - function : FromArray(in : Byte[]) ~ ByteRef[] { + function : FromArray(input : Byte[]) ~ ByteRef[] { out := ByteRef->New[input->Size()]; each(i : in) { @@ -2825,7 +2825,7 @@ bundle System { @param in array of references @return an array of primitives ~# - function : ToArray(in : ByteRef[]) ~ Byte[] { + function : ToArray(input : ByteRef[]) ~ Byte[] { out := Byte->New[input->Size()]; each(i : in) { @@ -2932,7 +2932,7 @@ bundle System { @param in array of primitives @return an array of references ~# - function : FromArray(in : Char[]) ~ CharRef[] { + function : FromArray(input : Char[]) ~ CharRef[] { out := CharRef->New[input->Size()]; each(i : in) { @@ -2947,7 +2947,7 @@ bundle System { @param in array of references @return an array of primitives ~# - function : ToArray(in : CharRef[]) ~ Char[] { + function : ToArray(input : CharRef[]) ~ Char[] { out := Char->New[input->Size()]; each(i : in) { @@ -3054,7 +3054,7 @@ bundle System { @param in array of primitives @return an array of references ~# - function : FromArray(in : Int[]) ~ IntRef[] { + function : FromArray(input : Int[]) ~ IntRef[] { out := IntRef->New[input->Size()]; each(i : in) { @@ -3069,7 +3069,7 @@ bundle System { @param in array of references @return an array of primitives ~# - function : ToArray(in : IntRef[]) ~ Int[] { + function : ToArray(input : IntRef[]) ~ Int[] { out := Int->New[input->Size()]; each(i : in) { @@ -3222,7 +3222,7 @@ bundle System { @param in array of primitives @return an array of references ~# - function : FromArray(in : Float[]) ~ FloatRef[] { + function : FromArray(input : Float[]) ~ FloatRef[] { out := FloatRef->New[input->Size()]; each(i : in) { @@ -3237,7 +3237,7 @@ bundle System { @param in array of references @return an array of primitives ~# - function : ToArray(in : FloatRef[]) ~ Float[] { + function : ToArray(input : FloatRef[]) ~ Float[] { out := Float->New[input->Size()]; each(i : in) { diff --git a/core/compiler/lib_src/xml.obs b/core/compiler/lib_src/xml.obs index b91b7b9ec..d48601df8 100644 --- a/core/compiler/lib_src/xml.obs +++ b/core/compiler/lib_src/xml.obs @@ -1222,7 +1222,7 @@ if(parser->Parse()) { # serializes an element # into a string ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# - method : ToString(in : String) ~ Nil { + method : ToString(input : String) ~ Nil { # element if(@name <> Nil & @type = XmlElement->Type->ELEMENT) { input->Append('<'); @@ -1532,7 +1532,7 @@ if(parser->Parse()) { @param in string to encode @return encoded string ~# - function : EncodeString(in : String) ~ String { + function : EncodeString(input : String) ~ String { out := String->New(); each(i : in) { @@ -1584,7 +1584,7 @@ if(parser->Parse()) { @param in string to decode @return decoded string ~# - function : DecodeString(in : String) ~ String { + function : DecodeString(input : String) ~ String { max := input->Size(); i := 0;