mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
Merge #1337
1337: Move syntax errors our of syntax tree r=matklad a=matklad I am not really sure if it's a good idea, but `SyntaxError` do not really belong to a `SyntaxTree`. So let's just store them on the side? Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
commit
7a1cae59ac
89 changed files with 705 additions and 687 deletions
|
@ -32,7 +32,7 @@ fn is_control_keyword(kind: SyntaxKind) -> bool {
|
|||
|
||||
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).tree;
|
||||
|
||||
fn calc_binding_hash(file_id: FileId, text: &SmolStr, shadow_count: u32) -> u64 {
|
||||
fn hash<T: std::hash::Hash + std::fmt::Debug>(x: T) -> u64 {
|
||||
|
@ -177,7 +177,7 @@ pub(crate) fn highlight(db: &RootDatabase, file_id: FileId) -> Vec<HighlightedRa
|
|||
}
|
||||
|
||||
pub(crate) fn highlight_as_html(db: &RootDatabase, file_id: FileId, rainbow: bool) -> String {
|
||||
let source_file = db.parse(file_id);
|
||||
let source_file = db.parse(file_id).tree;
|
||||
|
||||
fn rainbowify(seed: u64) -> String {
|
||||
use rand::prelude::*;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue