Procházet zdrojové kódy

chore: fix typos (#1644)

fix some typos

Signed-off-by: snoppy <michaleli@foxmail.com>
Snoppy před 1 rokem
rodič
revize
aa9efe98e9

+ 1 - 1
integration/solana/arrays.sol

@@ -14,7 +14,7 @@ contract arrays {
 	}
 
 	// declare a sparse array. Sparse arrays are arrays which are too large to
-	// fit into account data on Solana; this is not neccessarily a Solidity feature
+	// fit into account data on Solana; this is not necessarily a Solidity feature
 	user[type(uint64).max] users;
 
 	mapping (bytes32 => uint64) addressToUser;

+ 1 - 1
solana-library/spl_token.sol

@@ -128,7 +128,7 @@ library SplToken {
 	}
 
 	/// Revoke a previously approved delegate. This transaction should be signed by the owner. After
-	/// this transaction, no delgate is approved for any amount.
+	/// this transaction, no delegate is approved for any amount.
 	///
 	/// @param account the account for which a delegate should be approved
 	/// @param owner the publickey of the account owner keypair

+ 1 - 1
src/emit/math.rs

@@ -328,7 +328,7 @@ pub(super) fn multiply<'a, T: TargetRuntime<'a> + ?Sized>(
             bin.builder.build_store(l, left).unwrap();
             bin.builder.build_store(r, right).unwrap();
         }
-        // LLVM-IR can handle multiplication of sizes up to 64 bits. If the size is larger, we need to implement our own mutliplication function.
+        // LLVM-IR can handle multiplication of sizes up to 64 bits. If the size is larger, we need to implement our own multiplication function.
         // We divide the operands into sizes of 32 bits (check __mul32 in stdlib/bigint.c documentation).
         // If the size is not divisble by 32, we extend it to the next 32 bits. For example, int72 will be extended to int96.
         // Here, we zext the operands to the nearest 32 bits. zext is called instead of sext because we need to do unsigned multiplication by default.

+ 1 - 1
src/sema/expression/mod.rs

@@ -134,7 +134,7 @@ impl Expression {
             return Ok(self.clone());
         }
 
-        // First of all, if we have a ref then derefence it
+        // First of all, if we have a ref then dereference it
         if let Type::Ref(r) = &from {
             return if r.is_fixed_reference_type(ns) {
                 // A struct/fixed array *value* is simply the type, e.g. Type::Struct(_)

+ 1 - 1
src/sema/types.rs

@@ -152,7 +152,7 @@ pub fn resolve_typenames<'a>(
                         //
                         // int[2] var(bool);
                         // S var2();
-                        // funtion var3(int x);
+                        // function var3(int x);
                         // Event var4(bool f1);
                         // Error var4(bool f1);
                         // Feh.b1 var5();