mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
profile highlighting
This commit is contained in:
parent
1dc9adc6e2
commit
f6d2c3f9d5
1 changed files with 3 additions and 0 deletions
|
@ -2,6 +2,7 @@ use rustc_hash::FxHashSet;
|
||||||
|
|
||||||
use ra_syntax::{ast, AstNode, TextRange, Direction, SyntaxKind, SyntaxKind::*, SyntaxElement, T};
|
use ra_syntax::{ast, AstNode, TextRange, Direction, SyntaxKind, SyntaxKind::*, SyntaxElement, T};
|
||||||
use ra_db::SourceDatabase;
|
use ra_db::SourceDatabase;
|
||||||
|
use ra_prof::profile;
|
||||||
|
|
||||||
use crate::{FileId, db::RootDatabase};
|
use crate::{FileId, db::RootDatabase};
|
||||||
|
|
||||||
|
@ -27,6 +28,8 @@ fn is_control_keyword(kind: SyntaxKind) -> bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn highlight(db: &RootDatabase, file_id: FileId) -> Vec<HighlightedRange> {
|
pub(crate) fn highlight(db: &RootDatabase, file_id: FileId) -> Vec<HighlightedRange> {
|
||||||
|
let _p = profile("highlight");
|
||||||
|
|
||||||
let source_file = db.parse(file_id);
|
let source_file = db.parse(file_id);
|
||||||
|
|
||||||
// Visited nodes to handle highlighting priorities
|
// Visited nodes to handle highlighting priorities
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue