/dports/lang/rust/rustc-1.58.1-src/src/tools/rust-analyzer/crates/ide/src/syntax_highlighting/ |
H A D | tags.rs | 10 pub tag: HlTag, 18 pub enum HlTag { enum 124 impl HlTag { implementation 155 HlTag::Comment => "comment", in as_str() 158 HlTag::Keyword => "keyword", in as_str() 180 HlTag::None => "none", in as_str() 185 impl fmt::Display for HlTag { implementation 259 impl From<HlTag> for Highlight { 260 fn from(tag: HlTag) -> Highlight { in from() 279 Highlight::new(HlTag::Symbol(sym)) in from() [all …]
|
H A D | highlight.rs | 18 Highlight, HlMod, HlTag, 42 let h = HlTag::Comment; in token() 54 BYTE => HlTag::ByteLiteral.into(), in token() 55 CHAR => HlTag::CharLiteral.into(), in token() 64 HlTag::None.into() in token() 203 HlTag::Attribute.into() in node() 261 _ => HlTag::BuiltinAttr, in highlight_name_ref_in_attr() 263 None => HlTag::BuiltinAttr, in highlight_name_ref_in_attr() 333 h.tag = HlTag::Keyword; in highlight_name_ref() 628 let default = HlTag::UnresolvedReference; in highlight_name_by_syntax() [all …]
|
H A D | format.rs | 8 use crate::{syntax_highlighting::highlights::Highlights, HlRange, HlTag}; 56 fn highlight_format_specifier(kind: FormatSpecifier) -> Option<HlTag> { in highlight_format_specifier() argument 68 | FormatSpecifier::QuestionMark => HlTag::FormatSpecifier, in highlight_format_specifier() 70 FormatSpecifier::Integer | FormatSpecifier::Zero => HlTag::NumericLiteral, in highlight_format_specifier() 72 FormatSpecifier::Identifier => HlTag::Symbol(SymbolKind::Local), in highlight_format_specifier()
|
H A D | inject.rs | 18 Analysis, HlMod, HlRange, HlTag, RootDatabase, 34 hl.add(HlRange { range, highlight: HlTag::StringLiteral.into(), binding_hash: None }) in ra_fixture() 53 hl.add(HlRange { range, highlight: HlTag::Keyword.into(), binding_hash: None }); in ra_fixture() 75 hl.add(HlRange { range, highlight: HlTag::StringLiteral.into(), binding_hash: None }) in ra_fixture() 211 highlight: HlTag::Comment | HlMod::Documentation, in doc_comment() 242 fn module_def_to_hl_tag(def: Definition) -> HlTag { in module_def_to_hl_tag() argument 254 Definition::BuiltinType(_) => return HlTag::BuiltinType, in module_def_to_hl_tag() 266 HlTag::Symbol(symbol) in module_def_to_hl_tag()
|
H A D | tests.rs | 7 use crate::{fixture, FileRange, HlTag, TextRange}; 314 .filter(|it| it.highlight.tag == HlTag::Symbol(SymbolKind::Struct)) in benchmark_syntax_highlighting_long_struct() 340 .filter(|it| it.highlight.tag == HlTag::Symbol(SymbolKind::Struct)) in syntax_highlighting_not_quadratic() 365 .filter(|it| it.highlight.tag == HlTag::Symbol(SymbolKind::Function)) in benchmark_syntax_highlighting_parser()
|
H A D | highlights.rs | 7 use crate::{HlRange, HlTag}; 21 root: Node::new(HlRange { range, highlight: HlTag::None.into(), binding_hash: None }), in new()
|
H A D | macro_.rs | 4 use crate::{HlRange, HlTag}; 28 highlight: HlTag::UnresolvedReference.into(), in highlight()
|
/dports/devel/rust-analyzer/rust-analyzer-2021-12-20/crates/ide/src/syntax_highlighting/ |
H A D | tags.rs | 10 pub tag: HlTag, 18 pub enum HlTag { enum 123 impl HlTag { impl 157 HlTag::Comment => "comment", in as_str() 160 HlTag::Keyword => "keyword", in as_str() 182 HlTag::None => "none", in as_str() 187 impl fmt::Display for HlTag { implementation 261 impl From<HlTag> for Highlight { 262 fn from(tag: HlTag) -> Highlight { in from() 281 Highlight::new(HlTag::Symbol(sym)) in from() [all …]
|
H A D | highlight.rs | 18 Highlight, HlMod, HlTag, 42 let h = HlTag::Comment; in token() 54 BYTE => HlTag::ByteLiteral.into(), in token() 55 CHAR => HlTag::CharLiteral.into(), in token() 61 None => HlTag::None.into(), in token() 64 HlTag::None.into() in token() 203 HlTag::AttributeBracket.into() in node() 316 h.tag = HlTag::Keyword; in highlight_name_ref() 500 HlTag::Symbol(SymbolKind::Local) in highlight_def() 611 let default = HlTag::UnresolvedReference; in highlight_name_by_syntax() [all …]
|
H A D | format.rs | 8 use crate::{syntax_highlighting::highlights::Highlights, HlRange, HlTag}; 57 fn highlight_format_specifier(kind: FormatSpecifier) -> Option<HlTag> { in highlight_format_specifier() argument 69 | FormatSpecifier::QuestionMark => HlTag::FormatSpecifier, in highlight_format_specifier() 71 FormatSpecifier::Integer | FormatSpecifier::Zero => HlTag::NumericLiteral, in highlight_format_specifier() 73 FormatSpecifier::Identifier => HlTag::Symbol(SymbolKind::Local), in highlight_format_specifier()
|
H A D | inject.rs | 19 Analysis, HlMod, HlRange, HlTag, RootDatabase, 35 hl.add(HlRange { range, highlight: HlTag::StringLiteral.into(), binding_hash: None }) in ra_fixture() 54 hl.add(HlRange { range, highlight: HlTag::Keyword.into(), binding_hash: None }); in ra_fixture() 76 hl.add(HlRange { range, highlight: HlTag::StringLiteral.into(), binding_hash: None }) in ra_fixture() 212 highlight: HlTag::Comment | HlMod::Documentation, in doc_comment() 243 fn module_def_to_hl_tag(def: Definition) -> HlTag { in module_def_to_hl_tag() argument 255 Definition::BuiltinType(_) => return HlTag::BuiltinType, in module_def_to_hl_tag() 269 HlTag::Symbol(symbol) in module_def_to_hl_tag()
|
H A D | tests.rs | 7 use crate::{fixture, FileRange, HlTag, TextRange}; 325 .filter(|it| it.highlight.tag == HlTag::Symbol(SymbolKind::Struct)) in benchmark_syntax_highlighting_long_struct() 351 .filter(|it| it.highlight.tag == HlTag::Symbol(SymbolKind::Struct)) in syntax_highlighting_not_quadratic() 376 .filter(|it| it.highlight.tag == HlTag::Symbol(SymbolKind::Function)) in benchmark_syntax_highlighting_parser()
|
H A D | highlights.rs | 7 use crate::{HlRange, HlTag}; 21 root: Node::new(HlRange { range, highlight: HlTag::None.into(), binding_hash: None }), in new()
|
H A D | macro_.rs | 4 use crate::{HlRange, HlTag}; 28 highlight: HlTag::UnresolvedReference.into(), in highlight()
|
/dports/lang/rust/rustc-1.58.1-src/src/tools/rust-analyzer/crates/rust-analyzer/src/ |
H A D | to_proto.rs | 468 HlTag::Symbol(symbol) => match symbol { in semantic_token_type_and_modifiers() 503 HlTag::Attribute => semantic_tokens::ATTRIBUTE, in semantic_token_type_and_modifiers() 504 HlTag::BoolLiteral => semantic_tokens::BOOLEAN, in semantic_token_type_and_modifiers() 506 HlTag::BuiltinType => semantic_tokens::BUILTIN_TYPE, in semantic_token_type_and_modifiers() 507 HlTag::ByteLiteral | HlTag::NumericLiteral => lsp_types::SemanticTokenType::NUMBER, in semantic_token_type_and_modifiers() 508 HlTag::CharLiteral => semantic_tokens::CHAR, in semantic_token_type_and_modifiers() 509 HlTag::Comment => lsp_types::SemanticTokenType::COMMENT, in semantic_token_type_and_modifiers() 512 HlTag::Keyword => lsp_types::SemanticTokenType::KEYWORD, in semantic_token_type_and_modifiers() 513 HlTag::None => semantic_tokens::GENERIC, in semantic_token_type_and_modifiers() 514 HlTag::Operator(op) => match op { in semantic_token_type_and_modifiers() [all …]
|
/dports/devel/rust-analyzer/rust-analyzer-2021-12-20/crates/rust-analyzer/src/ |
H A D | to_proto.rs | 474 HlTag::Symbol(symbol) => match symbol { in semantic_token_type_and_modifiers() 514 HlTag::BoolLiteral => semantic_tokens::BOOLEAN, in semantic_token_type_and_modifiers() 515 HlTag::BuiltinType => semantic_tokens::BUILTIN_TYPE, in semantic_token_type_and_modifiers() 516 HlTag::ByteLiteral | HlTag::NumericLiteral => lsp_types::SemanticTokenType::NUMBER, in semantic_token_type_and_modifiers() 517 HlTag::CharLiteral => semantic_tokens::CHAR, in semantic_token_type_and_modifiers() 518 HlTag::Comment => lsp_types::SemanticTokenType::COMMENT, in semantic_token_type_and_modifiers() 519 HlTag::EscapeSequence => semantic_tokens::ESCAPE_SEQUENCE, in semantic_token_type_and_modifiers() 521 HlTag::Keyword => lsp_types::SemanticTokenType::KEYWORD, in semantic_token_type_and_modifiers() 522 HlTag::None => semantic_tokens::GENERIC, in semantic_token_type_and_modifiers() 523 HlTag::Operator(op) => match op { in semantic_token_type_and_modifiers() [all …]
|
/dports/devel/rust-analyzer/rust-analyzer-2021-12-20/crates/ide/src/ |
H A D | syntax_highlighting.rs | 30 FileId, HlMod, HlTag, 229 highlight: HlTag::Symbol(SymbolKind::Macro).into(), in traverse() 348 highlight: HlTag::EscapeSequence.into(), in traverse()
|
H A D | lib.rs | 97 tags::{Highlight, HlMod, HlMods, HlOperator, HlPunct, HlTag},
|
/dports/lang/rust/rustc-1.58.1-src/src/tools/rust-analyzer/crates/ide/src/ |
H A D | syntax_highlighting.rs | 30 FileId, HlMod, HlTag, 226 highlight: HlTag::Symbol(SymbolKind::Macro).into(), in traverse() 359 highlight: HlTag::EscapeSequence.into(), in traverse()
|
H A D | lib.rs | 92 tags::{Highlight, HlMod, HlMods, HlOperator, HlPunct, HlTag},
|