Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/proc-macro-api/src/bidirectional_protocol/msg.rs')
-rw-r--r--crates/proc-macro-api/src/bidirectional_protocol/msg.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/crates/proc-macro-api/src/bidirectional_protocol/msg.rs b/crates/proc-macro-api/src/bidirectional_protocol/msg.rs
index 0e3b700dcc..57e7b1ee8f 100644
--- a/crates/proc-macro-api/src/bidirectional_protocol/msg.rs
+++ b/crates/proc-macro-api/src/bidirectional_protocol/msg.rs
@@ -1,5 +1,7 @@
//! Bidirectional protocol messages
+use std::ops::Range;
+
use paths::Utf8PathBuf;
use serde::{Deserialize, Serialize};
@@ -14,6 +16,7 @@ pub enum SubRequest {
SourceText { file_id: u32, ast_id: u32, start: u32, end: u32 },
LocalFilePath { file_id: u32 },
LineColumn { file_id: u32, ast_id: u32, offset: u32 },
+ ByteRange { file_id: u32, ast_id: u32, start: u32, end: u32 },
}
#[derive(Debug, Serialize, Deserialize)]
@@ -32,6 +35,9 @@ pub enum SubResponse {
line: u32,
column: u32,
},
+ ByteRangeResult {
+ range: Range<usize>,
+ },
}
#[derive(Debug, Serialize, Deserialize)]