From 3289b9ccb4d9c9c5f603d3507a6257bda5c784f6 Mon Sep 17 00:00:00 2001 From: Nikita Sobolev Date: Sun, 22 Aug 2021 06:42:13 +0300 Subject: [PATCH] Fixes typos in all other files --- src/symboltable.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/symboltable.rs b/src/symboltable.rs index 1bdd1a2..f5cdde2 100644 --- a/src/symboltable.rs +++ b/src/symboltable.rs @@ -111,7 +111,7 @@ pub struct Symbol { // this is required to correct the scope in the analysis. pub is_assign_namedexpr_in_comprehension: bool, - // inidicates that the symbol is used a bound iterator variable. We distinguish this case + // indicates that the symbol is used a bound iterator variable. We distinguish this case // from normal assignment to detect unallowed re-assignment to iterator variables. pub is_iter: bool, @@ -470,7 +470,7 @@ impl SymbolTableAnalyzer { SymbolTableType::Function => { if let Some(parent_symbol) = symbols.get_mut(&symbol.name) { if let SymbolScope::Unknown = parent_symbol.scope { - // this information is new, as the asignment is done in inner scope + // this information is new, as the assignment is done in inner scope parent_symbol.is_assigned = true; } @@ -504,7 +504,7 @@ impl SymbolTableAnalyzer { None => { // extend the scope of the inner symbol // as we are in a nested comprehension, we expect that the symbol is needed - // ouside, too, and set it therefore to non-local scope. I.e., we expect to + // outside, too, and set it therefore to non-local scope. I.e., we expect to // find a definition on a higher level let mut cloned_sym = symbol.clone(); cloned_sym.scope = SymbolScope::Free; @@ -989,7 +989,7 @@ impl SymbolTableBuilder { } NamedExpr { target, value } => { - // named expressions are not allowed in the definiton of + // named expressions are not allowed in the definition of // comprehension iterator definitions if let ExpressionContext::IterDefinitionExp = context { return Err(SymbolTableError {