Skip to content
This repository was archived by the owner on Mar 1, 2019. It is now read-only.

Commit 5d2c63f

Browse files
committed
Add CompilationOptions
1 parent 09ed86c commit 5d2c63f

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/lib.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ pub struct Analysis {
3535
/// The Config used to generate this analysis data.
3636
pub config: Config,
3737
pub version: Option<String>,
38+
pub compilation: Option<CompilationOptions>,
3839
pub prelude: Option<CratePreludeData>,
3940
pub imports: Vec<Import>,
4041
pub defs: Vec<Def>,
@@ -53,6 +54,7 @@ impl Analysis {
5354
config,
5455
version: option_env!("CARGO_PKG_VERSION").map(|s| s.to_string()),
5556
prelude: None,
57+
compilation: None,
5658
imports: vec![],
5759
defs: vec![],
5860
impls: vec![],
@@ -115,6 +117,16 @@ pub struct SpanData {
115117
pub column_end: span::Column<span::OneIndexed>,
116118
}
117119

120+
#[cfg_attr(feature = "serialize-serde", derive(Serialize, Deserialize))]
121+
#[cfg_attr(feature = "serialize-rustc", derive(RustcDecodable, RustcEncodable))]
122+
#[derive(Debug, Clone)]
123+
pub struct CompilationOptions {
124+
pub directory: PathBuf,
125+
pub program: String,
126+
pub arguments: Vec<String>,
127+
pub output: PathBuf,
128+
}
129+
118130
#[cfg_attr(feature = "serialize-serde", derive(Serialize, Deserialize))]
119131
#[cfg_attr(feature = "serialize-rustc", derive(RustcDecodable, RustcEncodable))]
120132
#[derive(Debug, Clone)]

0 commit comments

Comments
 (0)