You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When traversing, skip over AST nodes that originate from cached modules and only traverse and collect tokens from the file that was modified.
TokenMap
/// Remove all tokens for the given file from the token map.pubfn remove_tokens_for_file(&self,path_to_remove:&PathBuf){self.0.retain(|key, _value| {
key.path.as_ref().map_or(true, |path| path != path_to_remove)});
the in the traverse function
pubfntraverse(results:Vec<(Option<Programs>,Handler)>,engines_clone:&Engines,session:Arc<Session>,file_versions:&BTreeMap<PathBuf,Option<u64>>) -> Result<Option<CompileResults>,LanguageServerError>{// Clear the tokens out of the TokenMap if the file has changed.let modified_file = file_versions.iter().find_map(|(path, version)| {
version.map(|_| path)});match modified_file {Some(path) => {
session.token_map.remove_tokens_for_file(path);},None => {
session.token_map.clear();},}}
The text was updated successfully, but these errors were encountered:
When traversing, skip over AST nodes that originate from cached modules and only traverse and collect tokens from the file that was modified.
TokenMap
the in the traverse function
The text was updated successfully, but these errors were encountered: