From 315ad83922762d3eede177a87fbb9dab19d8ca57 Mon Sep 17 00:00:00 2001 From: shruti2522 Date: Mon, 3 Jun 2024 19:20:32 +0530 Subject: [PATCH] remove repititions Signed-off-by: shruti2522 --- kclvm/sema/src/namer/mod.rs | 11 ----------- kclvm/tools/src/LSP/src/semantic_token.rs | 2 +- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/kclvm/sema/src/namer/mod.rs b/kclvm/sema/src/namer/mod.rs index c165b2ea2..2775a4b66 100644 --- a/kclvm/sema/src/namer/mod.rs +++ b/kclvm/sema/src/namer/mod.rs @@ -123,16 +123,6 @@ impl<'ctx> Namer<'ctx> { // add new pkgs to invalidate pkgs namer.gs.new_or_invalidate_pkgs.insert(name.clone()); - // new pkgs or invalidate pkg - if namer.gs.get_packages().get_package_info(name).is_some() - && !namer.gs.new_or_invalidate_pkgs.contains(name) - { - continue; - } - - // add new pkgs to invalidate pkgs - namer.gs.new_or_invalidate_pkgs.insert(name.clone()); - { if modules.is_empty() { continue; @@ -190,7 +180,6 @@ impl<'ctx> Namer<'ctx> { namer.define_symbols(); // namer.gs - // namer.gs } fn init_builtin_symbols(&mut self) { diff --git a/kclvm/tools/src/LSP/src/semantic_token.rs b/kclvm/tools/src/LSP/src/semantic_token.rs index f7784bc71..d0d57fea6 100644 --- a/kclvm/tools/src/LSP/src/semantic_token.rs +++ b/kclvm/tools/src/LSP/src/semantic_token.rs @@ -6,7 +6,7 @@ use kclvm_sema::core::{ symbol::{KCLSymbol, SymbolKind}, }; use kclvm_sema::ty::TypeKind; -use lsp_types::{SemanticToken, SemanticTokenType, SemanticTokens, SemanticTokensResult}; +use lsp_types::{SemanticToken, SemanticTokenType, SmanticTokens, SemanticTokensResult}; pub const LEGEND_TYPE: &[SemanticTokenType] = &[ SemanticTokenType::VARIABLE,