Skip to content

Commit 799f83e

Browse files
authored
fix: expose VyperSourceLocation fields (#333)
Expose individual fields in `VyperSourceLocation` for usage downstream. This is already the case [for the corresponding solc fields](https://github.com/foundry-rs/compilers/blob/326f79435783173bacfaaa9162a6b801fb7a7fe3/crates/artifacts/solc/src/error.rs#L8): ```rust // crates/artifacts/solc/src/error.rs #[derive(Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)] pub struct SourceLocation { pub file: String, pub start: i32, pub end: i32, } #[derive(Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)] pub struct SecondarySourceLocation { pub file: Option<String>, pub start: Option<i32>, pub end: Option<i32>, pub message: Option<String>, } ```
1 parent 2d6fbeb commit 799f83e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

crates/artifacts/vyper/src/error.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ use std::path::PathBuf;
55

66
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
77
pub struct VyperSourceLocation {
8-
file: PathBuf,
8+
pub file: PathBuf,
99
#[serde(rename = "lineno")]
10-
line: Option<u64>,
10+
pub line: Option<u64>,
1111
#[serde(rename = "col_offset")]
12-
offset: Option<u64>,
12+
pub offset: Option<u64>,
1313
}
1414

1515
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]

0 commit comments

Comments
 (0)