update & lock solang (#1256)
This commit is contained in:
parent
94cf8a8f77
commit
135bca4680
|
@ -2280,17 +2280,6 @@ dependencies = [
|
||||||
"winapi",
|
"winapi",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "num-bigint"
|
|
||||||
version = "0.4.3"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f"
|
|
||||||
dependencies = [
|
|
||||||
"autocfg",
|
|
||||||
"num-integer",
|
|
||||||
"num-traits",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "num-integer"
|
name = "num-integer"
|
||||||
version = "0.1.44"
|
version = "0.1.44"
|
||||||
|
@ -2301,18 +2290,6 @@ dependencies = [
|
||||||
"num-traits",
|
"num-traits",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "num-rational"
|
|
||||||
version = "0.4.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "d41702bd167c2df5520b384281bc111a4b5efcf7fbc4c9c222c815b07e0a6a6a"
|
|
||||||
dependencies = [
|
|
||||||
"autocfg",
|
|
||||||
"num-bigint",
|
|
||||||
"num-integer",
|
|
||||||
"num-traits",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "num-traits"
|
name = "num-traits"
|
||||||
version = "0.2.14"
|
version = "0.2.14"
|
||||||
|
@ -3579,15 +3556,13 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "solang-parser"
|
name = "solang-parser"
|
||||||
version = "0.1.12"
|
version = "0.1.13"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e6b2ad9c159bd02219a59368133301e6195fdaa2b5d55c628ccdcd611d49235f"
|
checksum = "395b6e1ec5af117bd08f963c7cd80f8efd4eed51c5a332aed42b13e3f9bc860b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"itertools",
|
||||||
"lalrpop",
|
"lalrpop",
|
||||||
"lalrpop-util",
|
"lalrpop-util",
|
||||||
"num-bigint",
|
|
||||||
"num-rational",
|
|
||||||
"num-traits",
|
|
||||||
"phf",
|
"phf",
|
||||||
"unicode-xid",
|
"unicode-xid",
|
||||||
]
|
]
|
||||||
|
|
|
@ -35,7 +35,7 @@ tempfile = { version = "3.3.0", optional = true }
|
||||||
fs_extra = { version = "1.2.0", optional = true }
|
fs_extra = { version = "1.2.0", optional = true }
|
||||||
sha2 = { version = "0.9.8", default-features = false, optional = true }
|
sha2 = { version = "0.9.8", default-features = false, optional = true }
|
||||||
dunce = "1.0.2"
|
dunce = "1.0.2"
|
||||||
solang-parser = { default-features = false, version = "0.1.12" }
|
solang-parser = { default-features = false, version = "=0.1.13" }
|
||||||
rayon = "1.5.2"
|
rayon = "1.5.2"
|
||||||
rand = { version = "0.8.5", optional = true }
|
rand = { version = "0.8.5", optional = true }
|
||||||
path-slash = "0.1.4"
|
path-slash = "0.1.4"
|
||||||
|
|
|
@ -49,7 +49,7 @@ impl SolData {
|
||||||
Ok((units, _)) => {
|
Ok((units, _)) => {
|
||||||
for unit in units.0 {
|
for unit in units.0 {
|
||||||
match unit {
|
match unit {
|
||||||
SourceUnitPart::PragmaDirective(loc, _, pragma, value) => {
|
SourceUnitPart::PragmaDirective(loc, pragma, value) => {
|
||||||
if pragma.name == "solidity" {
|
if pragma.name == "solidity" {
|
||||||
// we're only interested in the solidity version pragma
|
// we're only interested in the solidity version pragma
|
||||||
version = Some(SolDataUnit::from_loc(value.string.clone(), loc));
|
version = Some(SolDataUnit::from_loc(value.string.clone(), loc));
|
||||||
|
@ -60,7 +60,7 @@ impl SolData {
|
||||||
Some(SolDataUnit::from_loc(value.string.clone(), loc));
|
Some(SolDataUnit::from_loc(value.string.clone(), loc));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SourceUnitPart::ImportDirective(_, import) => {
|
SourceUnitPart::ImportDirective(import) => {
|
||||||
let (import, ids, loc) = match import {
|
let (import, ids, loc) = match import {
|
||||||
Import::Plain(s, l) => (s, vec![], l),
|
Import::Plain(s, l) => (s, vec![], l),
|
||||||
Import::GlobalSymbol(s, i, l) => (s, vec![(i, None)], l),
|
Import::GlobalSymbol(s, i, l) => (s, vec![(i, None)], l),
|
||||||
|
|
|
@ -415,7 +415,7 @@ mod tests {
|
||||||
let (unit, _) = solang_parser::parse(s, 0).unwrap();
|
let (unit, _) = solang_parser::parse(s, 0).unwrap();
|
||||||
assert_eq!(unit.0.len(), 1);
|
assert_eq!(unit.0.len(), 1);
|
||||||
match unit.0[0] {
|
match unit.0[0] {
|
||||||
SourceUnitPart::ImportDirective(_, _) => {}
|
SourceUnitPart::ImportDirective(_) => {}
|
||||||
_ => unreachable!("failed to parse import"),
|
_ => unreachable!("failed to parse import"),
|
||||||
}
|
}
|
||||||
let imports: Vec<_> = find_import_paths(s).map(|m| m.as_str()).collect();
|
let imports: Vec<_> = find_import_paths(s).map(|m| m.as_str()).collect();
|
||||||
|
|
Loading…
Reference in New Issue