mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-10 07:04:22 +00:00
implement literal_from_str (poorly)
This commit is contained in:
parent
d25b61030e
commit
480f555334
1 changed files with 9 additions and 2 deletions
|
@ -80,9 +80,16 @@ impl server::FreeFunctions for RustAnalyzer {
|
|||
|
||||
fn literal_from_str(
|
||||
&mut self,
|
||||
_s: &str,
|
||||
s: &str,
|
||||
) -> Result<bridge::Literal<Self::Span, Self::Symbol>, ()> {
|
||||
todo!()
|
||||
// TODO: keep track of LitKind and Suffix
|
||||
let symbol = SYMBOL_INTERNER.lock().unwrap().intern(s);
|
||||
Ok(bridge::Literal {
|
||||
kind: bridge::LitKind::Err,
|
||||
symbol,
|
||||
suffix: None,
|
||||
span: tt::TokenId::unspecified(),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue