From ffb5f0e6885f17e4c28cc3046e10a90a0b102009 Mon Sep 17 00:00:00 2001 From: Hanaasagi Date: Sun, 7 May 2023 03:43:53 +0900 Subject: [PATCH] chore: fix all typo --- crates/els/completion.rs | 2 +- crates/erg_compiler/context/compare.rs | 4 ++-- crates/erg_parser/tests/test2_advanced_syntax.er | 2 +- doc/EN/syntax/32_error_handling.md | 2 +- examples/fib.er | 2 +- tests/should_ok/comment.er | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/crates/els/completion.rs b/crates/els/completion.rs index d0683fb9..72424868 100644 --- a/crates/els/completion.rs +++ b/crates/els/completion.rs @@ -457,7 +457,7 @@ impl Server { continue; } let label = name.inspect(); - // don't show overriden items + // don't show overridden items if already_appeared.contains(&label[..]) { continue; } diff --git a/crates/erg_compiler/context/compare.rs b/crates/erg_compiler/context/compare.rs index e3e1800a..a6f6fe89 100644 --- a/crates/erg_compiler/context/compare.rs +++ b/crates/erg_compiler/context/compare.rs @@ -435,7 +435,7 @@ impl Context { let rhs_meta = self.meta_type(rhs); self.supertype_of(&lfvt, &rhs_meta) } else { - // constraint is uninitalized + // constraint is uninitialized log!(err "constraint is uninitialized: {lfv}/{rhs}"); true } @@ -457,7 +457,7 @@ impl Context { let lhs_meta = self.meta_type(lhs); self.supertype_of(&lhs_meta, &rfvt) } else { - // constraint is uninitalized + // constraint is uninitialized log!(err "constraint is uninitialized: {lhs}/{rfv}"); true } diff --git a/crates/erg_parser/tests/test2_advanced_syntax.er b/crates/erg_parser/tests/test2_advanced_syntax.er index 70fe6252..7b0ce3d9 100644 --- a/crates/erg_parser/tests/test2_advanced_syntax.er +++ b/crates/erg_parser/tests/test2_advanced_syntax.er @@ -1,7 +1,7 @@ # Check that a parser can pass the advanced syntax # 高度な文法をチェックする -# mutliple patterns definition +# multiple patterns definition fib 0 = 0 fib 1 = 1 fib(n: Nat): Nat = fib(n-1) + fib(n-2) diff --git a/doc/EN/syntax/32_error_handling.md b/doc/EN/syntax/32_error_handling.md index 28eaa6b6..29e74fa9 100644 --- a/doc/EN/syntax/32_error_handling.md +++ b/doc/EN/syntax/32_error_handling.md @@ -50,7 +50,7 @@ The benefits of using the `Result` type don't stop there. The `Result` type is a Since the `Error`/`Result` type alone does not cause side effects, unlike exceptions, it cannot have information such as the sending location (Context), but if you use the `.context` method, you can put information in the `Error` object. can be added. The `.context` method is a type of method that consumes the `Error` object itself and creates a new `Error` object. They are chainable and can hold multiple contexts. -```python,chekcer_ignore +```python,checker_ignore f() = todo() \ .context "to be implemented in ver 1.2" \ diff --git a/examples/fib.er b/examples/fib.er index 895507bb..c5ba529d 100644 --- a/examples/fib.er +++ b/examples/fib.er @@ -1,7 +1,7 @@ fib 0 = 0 fib 1 = 1 # a type annotation is required for the recursive function -# NOTE: currenlty we must specify `n` as `Int` (not `Nat`), because Erg points out the possibility that `n-1` and `n-2` could be minus +# NOTE: currently we must specify `n` as `Int` (not `Nat`), because Erg points out the possibility that `n-1` and `n-2` could be minus fib(n: Int): Nat = fib(n-1) + fib(n-2) assert fib(10) == 55 diff --git a/tests/should_ok/comment.er b/tests/should_ok/comment.er index 306824c1..c39ccc4e 100644 --- a/tests/should_ok/comment.er +++ b/tests/should_ok/comment.er @@ -2,7 +2,7 @@ ]#;print! "there" print! #[]#0, 1#[]#, 2,#[]#3 a = { - #[first]#name #[second]#=#[third]#"John"#[fouth]# + #[first]#name #[second]#=#[third]#"John"#[fourth]# } Del a #[]#print! 0