aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_tt/src/lib.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-03-31 15:30:24 +0100
committerGitHub <[email protected]>2020-03-31 15:30:24 +0100
commit7a546490ecb93b9da1cd888086f00a69ebd8d0aa (patch)
tree18c25777f7f0fad8f60f58bf7187db45fe3307fd /crates/ra_tt/src/lib.rs
parentfa3c7742af9fbfe5146f4158a6119fa727dcc87a (diff)
parent207903a1c33961c2014010f5678b1c6807e7f6d6 (diff)
Merge #3738
3738: Implement ra_proc_macro client logic r=matklad a=edwin0cheng This PR add the actual client logic for `ra_proc_macro` crate: 1. Define all necessary rpc serialization data structure, which include `ra_tt` related data and some task messages. Although adding `Serialize` and `Deserialize` trait to ra_tt directly seem to be much easier, we deliberately duplicate the `ra_tt` struct with `#[serde(with = "XXDef")]` for separation of code responsibility. 2. Define a simplified version of lsp base protocol for rpc, which basically copy from lsp-server code base. 3. Implement the actual `IO` for the client side progress spawning and message passing. Co-authored-by: Edwin Cheng <[email protected]>
Diffstat (limited to 'crates/ra_tt/src/lib.rs')
-rw-r--r--crates/ra_tt/src/lib.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/crates/ra_tt/src/lib.rs b/crates/ra_tt/src/lib.rs
index 1015ce0a6..bd484aa30 100644
--- a/crates/ra_tt/src/lib.rs
+++ b/crates/ra_tt/src/lib.rs
@@ -189,7 +189,12 @@ impl Subtree {
189pub mod buffer; 189pub mod buffer;
190 190
191#[derive(Debug, PartialEq, Eq)] 191#[derive(Debug, PartialEq, Eq)]
192pub enum ExpansionError {} 192pub enum ExpansionError {
193 IOError(String),
194 JsonError(String),
195 Unknown(String),
196 ExpansionError(String),
197}
193 198
194pub trait TokenExpander: Debug + Send + Sync + RefUnwindSafe { 199pub trait TokenExpander: Debug + Send + Sync + RefUnwindSafe {
195 fn expand(&self, subtree: &Subtree, attrs: Option<&Subtree>) 200 fn expand(&self, subtree: &Subtree, attrs: Option<&Subtree>)