From 79a7e5e42b22084319b912e0b49b76aa551ed840 Mon Sep 17 00:00:00 2001 From: klemens Date: Sat, 9 Feb 2019 12:00:46 +0100 Subject: [PATCH] spelling fixes --- parser/src/lexer.rs | 2 +- py_code_object/src/vm_old.rs | 4 ++-- src/main.rs | 2 +- vm/src/frame.rs | 2 +- vm/src/obj/objint.rs | 2 +- vm/src/obj/objstr.rs | 2 +- vm/src/stdlib/json.rs | 2 +- vm/src/stdlib/os.rs | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/parser/src/lexer.rs b/parser/src/lexer.rs index 0d721f7d1..58660a901 100644 --- a/parser/src/lexer.rs +++ b/parser/src/lexer.rs @@ -1,5 +1,5 @@ //! This module takes care of lexing python source text. This means source -//! code is translated into seperate tokens. +//! code is translated into separate tokens. pub use super::token::Tok; use num_bigint::BigInt; diff --git a/py_code_object/src/vm_old.rs b/py_code_object/src/vm_old.rs index aecefde46..a3747a946 100644 --- a/py_code_object/src/vm_old.rs +++ b/py_code_object/src/vm_old.rs @@ -56,7 +56,7 @@ impl VirtualMachine { } } - // Can we get rid of the code paramter? + // Can we get rid of the code parameter? fn make_frame(&self, code: PyCodeObject, callargs: HashMap>, globals: Option>>) -> Frame { //populate the globals and locals @@ -345,7 +345,7 @@ impl VirtualMachine { let exception = match argc { 1 => curr_frame.stack.pop().unwrap(), 0 | 2 | 3 => panic!("Not implemented!"), - _ => panic!("Invalid paramter for RAISE_VARARGS, must be between 0 to 3") + _ => panic!("Invalid parameter for RAISE_VARARGS, must be between 0 to 3") }; panic!("{:?}", exception); } diff --git a/src/main.rs b/src/main.rs index a5672e700..52be6656e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -177,7 +177,7 @@ fn run_shell(vm: &mut VirtualMachine) -> PyResult { } loop { - // TODO: modules dont support getattr / setattr yet + // TODO: modules don't support getattr / setattr yet //let prompt = match vm.get_attribute(vm.sys_module.clone(), "ps1") { // Ok(value) => objstr::get_value(&value), // Err(_) => ">>>>> ".to_string(), diff --git a/vm/src/frame.rs b/vm/src/frame.rs index 3b763b0af..ac118dcb7 100644 --- a/vm/src/frame.rs +++ b/vm/src/frame.rs @@ -504,7 +504,7 @@ impl Frame { let exception = match argc { 1 => self.pop_value(), 0 | 2 | 3 => panic!("Not implemented!"), - _ => panic!("Invalid paramter for RAISE_VARARGS, must be between 0 to 3"), + _ => panic!("Invalid parameter for RAISE_VARARGS, must be between 0 to 3"), }; if objtype::isinstance(&exception, &vm.ctx.exceptions.base_exception_type) { info!("Exception raised: {:?}", exception); diff --git a/vm/src/obj/objint.rs b/vm/src/obj/objint.rs index 646dd13f9..06424e149 100644 --- a/vm/src/obj/objint.rs +++ b/vm/src/obj/objint.rs @@ -58,7 +58,7 @@ pub fn to_int( match i32::from_str_radix(&s, base) { Ok(v) => v.to_bigint().unwrap(), Err(err) => { - trace!("Error occured during int conversion {:?}", err); + trace!("Error occurred during int conversion {:?}", err); return Err(vm.new_value_error(format!( "invalid literal for int() with base {}: '{}'", base, s diff --git a/vm/src/obj/objstr.rs b/vm/src/obj/objstr.rs index c33f70326..d71cf3a69 100644 --- a/vm/src/obj/objstr.rs +++ b/vm/src/obj/objstr.rs @@ -494,7 +494,7 @@ fn str_islower(vm: &mut VirtualMachine, args: PyFuncArgs) -> PyResult { )) } -// doesn't implement keep new line delimeter just yet +// doesn't implement keep new line delimiter just yet fn str_splitlines(vm: &mut VirtualMachine, args: PyFuncArgs) -> PyResult { arg_check!(vm, args, required = [(s, Some(vm.ctx.str_type()))]); let elements = get_value(&s) diff --git a/vm/src/stdlib/json.rs b/vm/src/stdlib/json.rs index 1101a8713..9f9e705ec 100644 --- a/vm/src/stdlib/json.rs +++ b/vm/src/stdlib/json.rs @@ -52,7 +52,7 @@ impl<'s> serde::Serialize for PyObjectSerializer<'s> { } else if objtype::isinstance(self.pyobject, &self.ctx.int_type()) { let v = objint::get_value(self.pyobject); serializer.serialize_i64(v.to_i64().unwrap()) - // Allthough this may seem nice, it does not give the right result: + // Although this may seem nice, it does not give the right result: // v.serialize(serializer) } else if objtype::isinstance(self.pyobject, &self.ctx.list_type()) { let elements = objsequence::get_elements(self.pyobject); diff --git a/vm/src/stdlib/os.rs b/vm/src/stdlib/os.rs index 4c54f5847..ac284bddc 100644 --- a/vm/src/stdlib/os.rs +++ b/vm/src/stdlib/os.rs @@ -54,7 +54,7 @@ pub fn os_close(vm: &mut VirtualMachine, args: PyFuncArgs) -> PyResult { let raw_fileno = objint::get_value(&fileno); //The File type automatically closes when it goes out of scope. - //To enable us to close these file desciptors (and hence prevent leaks) + //To enable us to close these file descriptors (and hence prevent leaks) //we seek to create the relevant File and simply let it pass out of scope! rust_file(raw_fileno.to_i64().unwrap());