diff --git a/.github/workflows/release-llvm.yml b/.github/workflows/release-llvm.yml index 4c301a7..504dfb9 100644 --- a/.github/workflows/release-llvm.yml +++ b/.github/workflows/release-llvm.yml @@ -94,7 +94,7 @@ jobs: - name: Install LLVM Builder run: | - cargo install --path crates/llvm-builder + cargo install --locked --force --path crates/llvm-builder - name: Clone LLVM run: | diff --git a/Cargo.lock b/Cargo.lock index 63e4e04..7004fa4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8358,6 +8358,31 @@ dependencies = [ "windows-registry", ] +[[package]] +name = "resolc" +version = "0.1.0-dev.16" +dependencies = [ + "anyhow", + "clap", + "git2", + "hex", + "inkwell", + "libc", + "mimalloc", + "once_cell", + "path-slash", + "rayon", + "revive-common", + "revive-llvm-context", + "revive-solc-json-interface", + "revive-yul", + "semver 1.0.26", + "serde", + "serde_json", + "sha3", + "which", +] + [[package]] name = "revive-benchmarks" version = "0.1.0-dev.16" @@ -8412,9 +8437,9 @@ dependencies = [ "alloy-sol-types", "hex", "rayon", + "resolc", "revive-llvm-context", "revive-runner", - "revive-solidity", "serde", "serde_json", "sha1", @@ -8487,9 +8512,9 @@ dependencies = [ "hex", "parity-scale-codec", "polkadot-sdk 2503.0.1", + "resolc", "revive-differential", "revive-llvm-context", - "revive-solidity", "scale-info", "serde", "serde_json", @@ -8517,33 +8542,6 @@ dependencies = [ "serde_json", ] -[[package]] -name = "revive-solidity" -version = "0.1.0-dev.16" -dependencies = [ - "anyhow", - "clap", - "git2", - "hex", - "inkwell", - "libc", - "mimalloc", - "num", - "once_cell", - "path-slash", - "rayon", - "regex", - "revive-common", - "revive-llvm-context", - "revive-solc-json-interface", - "semver 1.0.26", - "serde", - "serde_json", - "sha3", - "thiserror 2.0.12", - "which", -] - [[package]] name = "revive-stdlib" version = "0.1.0-dev.16" @@ -8552,6 +8550,20 @@ dependencies = [ "revive-build-utils", ] +[[package]] +name = "revive-yul" +version = "0.1.0-dev.16" +dependencies = [ + "anyhow", + "inkwell", + "num", + "regex", + "revive-common", + "revive-llvm-context", + "serde", + "thiserror 2.0.12", +] + [[package]] name = "rfc6979" version = "0.4.0" diff --git a/Cargo.toml b/Cargo.toml index f775607..ed8e9c1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,6 +14,7 @@ repository = "https://github.com/paritytech/revive" rust-version = "1.85.0" [workspace.dependencies] +resolc = { version = "0.1.0-dev.16", path = "crates/resolc" } revive-benchmarks = { version = "0.1.0-dev.16", path = "crates/benchmarks" } revive-builtins = { version = "0.1.0-dev.16", path = "crates/builtins" } revive-common = { version = "0.1.0-dev.16", path = "crates/common" } @@ -25,9 +26,9 @@ revive-llvm-context = { version = "0.1.0-dev.16", path = "crates/llvm-context" } revive-runtime-api = { version = "0.1.0-dev.16", path = "crates/runtime-api" } revive-runner = { version = "0.1.0-dev.16", path = "crates/runner" } revive-solc-json-interface = { version = "0.1.0-dev.16", path = "crates/solc-json-interface" } -revive-solidity = { version = "0.1.0-dev.16", path = "crates/solidity" } revive-stdlib = { version = "0.1.0-dev.16", path = "crates/stdlib" } revive-build-utils = { version = "0.1.0-dev.16", path = "crates/build-utils" } +revive-yul = { version = "0.1.0-dev.16", path = "crates/yul" } hex = "0.4.3" cc = "1.2" diff --git a/Makefile b/Makefile index 4e92847..4593cc7 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ machete \ test \ test-integration \ - test-solidity \ + test-resolc \ test-workspace \ test-cli \ test-wasm \ @@ -24,24 +24,24 @@ install: install-bin install-npm install-bin: - cargo install --locked --path crates/solidity + cargo install --force --locked --path crates/resolc install-npm: npm install && npm fund install-wasm: install-npm - cargo build --target wasm32-unknown-emscripten -p revive-solidity --release --no-default-features + cargo build --target wasm32-unknown-emscripten -p resolc --release --no-default-features npm run build:package install-llvm-builder: - cargo install --path crates/llvm-builder + cargo install --force --locked --path crates/llvm-builder install-llvm: install-llvm-builder revive-llvm clone revive-llvm build --llvm-projects lld --llvm-projects clang install-revive-runner: - cargo install --path crates/runner --no-default-features --locked + cargo install --locked --force --path crates/runner --no-default-features format: cargo fmt --all --check @@ -58,8 +58,8 @@ test: format clippy machete test-cli test-workspace install-revive-runner test-integration: install-bin cargo test --package revive-integration -test-solidity: install - cargo test --package revive-solidity +test-resolc: install + cargo test --package resolc test-workspace: install cargo test --workspace --exclude revive-llvm-builder @@ -90,6 +90,6 @@ clean: cargo clean ; \ revive-llvm clean ; \ rm -rf node_modules ; \ - rm -rf crates/solidity/src/tests/cli-tests/artifacts ; \ - cargo uninstall revive-solidity ; \ + rm -rf crates/resolc/src/tests/cli-tests/artifacts ; \ + cargo uninstall resolc ; \ cargo uninstall revive-llvm-builder ; diff --git a/crates/integration/Cargo.toml b/crates/integration/Cargo.toml index e6483c5..0caab80 100644 --- a/crates/integration/Cargo.toml +++ b/crates/integration/Cargo.toml @@ -13,7 +13,7 @@ alloy-sol-types = { workspace = true } hex = { workspace = true } serde_json = { workspace = true } -revive-solidity = { workspace = true } +resolc = { workspace = true } revive-runner = { workspace = true } revive-llvm-context = { workspace = true } diff --git a/crates/integration/src/cases.rs b/crates/integration/src/cases.rs index 19afb0d..df1b9a6 100644 --- a/crates/integration/src/cases.rs +++ b/crates/integration/src/cases.rs @@ -1,8 +1,8 @@ use alloy_primitives::{Address, Bytes, I256, U256}; use alloy_sol_types::{sol, SolCall, SolConstructor}; +use resolc::test_utils::*; use revive_llvm_context::OptimizerSettings; -use revive_solidity::test_utils::*; #[derive(Clone)] pub struct Contract { diff --git a/crates/solidity/Cargo.toml b/crates/resolc/Cargo.toml similarity index 91% rename from crates/solidity/Cargo.toml rename to crates/resolc/Cargo.toml index 3670a16..764219f 100644 --- a/crates/solidity/Cargo.toml +++ b/crates/resolc/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "revive-solidity" +name = "resolc" version.workspace = true license.workspace = true edition.workspace = true @@ -18,26 +18,23 @@ path = "src/resolc/main.rs" doctest = false [dependencies] -clap = { workspace = true } -thiserror = { workspace = true } anyhow = { workspace = true } -which = { workspace = true } +clap = { workspace = true } +hex = { workspace = true } +inkwell = { workspace = true } +once_cell = { workspace = true } path-slash = { workspace = true } rayon = { workspace = true, optional = true } - +semver = { workspace = true } serde = { workspace = true } serde_json = { workspace = true } -semver = { workspace = true } -once_cell = { workspace = true } -regex = { workspace = true } -hex = { workspace = true } -num = { workspace = true } sha3 = { workspace = true } -inkwell = { workspace = true } +which = { workspace = true } revive-common = { workspace = true } revive-llvm-context = { workspace = true } revive-solc-json-interface = { workspace = true, features = ["resolc"] } +revive-yul = { workspace = true } [target.'cfg(target_env = "musl")'.dependencies] mimalloc = { version = "*", default-features = false } diff --git a/crates/solidity/build.rs b/crates/resolc/build.rs similarity index 100% rename from crates/solidity/build.rs rename to crates/resolc/build.rs diff --git a/crates/solidity/src/build/contract.rs b/crates/resolc/src/build/contract.rs similarity index 100% rename from crates/solidity/src/build/contract.rs rename to crates/resolc/src/build/contract.rs diff --git a/crates/solidity/src/build/mod.rs b/crates/resolc/src/build/mod.rs similarity index 100% rename from crates/solidity/src/build/mod.rs rename to crates/resolc/src/build/mod.rs diff --git a/crates/solidity/src/const.rs b/crates/resolc/src/const.rs similarity index 100% rename from crates/solidity/src/const.rs rename to crates/resolc/src/const.rs diff --git a/crates/solidity/src/lib.rs b/crates/resolc/src/lib.rs similarity index 99% rename from crates/solidity/src/lib.rs rename to crates/resolc/src/lib.rs index 5d6102b..d705f23 100644 --- a/crates/solidity/src/lib.rs +++ b/crates/resolc/src/lib.rs @@ -7,7 +7,6 @@ pub(crate) mod process; pub(crate) mod project; pub(crate) mod solc; pub(crate) mod version; -pub(crate) mod yul; pub use self::build::contract::Contract as ContractBuild; pub use self::build::Build; diff --git a/crates/solidity/src/missing_libraries.rs b/crates/resolc/src/missing_libraries.rs similarity index 100% rename from crates/solidity/src/missing_libraries.rs rename to crates/resolc/src/missing_libraries.rs diff --git a/crates/solidity/src/process/input.rs b/crates/resolc/src/process/input.rs similarity index 100% rename from crates/solidity/src/process/input.rs rename to crates/resolc/src/process/input.rs diff --git a/crates/solidity/src/process/mod.rs b/crates/resolc/src/process/mod.rs similarity index 100% rename from crates/solidity/src/process/mod.rs rename to crates/resolc/src/process/mod.rs diff --git a/crates/solidity/src/process/native_process.rs b/crates/resolc/src/process/native_process.rs similarity index 100% rename from crates/solidity/src/process/native_process.rs rename to crates/resolc/src/process/native_process.rs diff --git a/crates/solidity/src/process/output.rs b/crates/resolc/src/process/output.rs similarity index 100% rename from crates/solidity/src/process/output.rs rename to crates/resolc/src/process/output.rs diff --git a/crates/solidity/src/process/worker_process.rs b/crates/resolc/src/process/worker_process.rs similarity index 100% rename from crates/solidity/src/process/worker_process.rs rename to crates/resolc/src/process/worker_process.rs diff --git a/crates/solidity/src/project/contract/ir/llvm_ir.rs b/crates/resolc/src/project/contract/ir/llvm_ir.rs similarity index 100% rename from crates/solidity/src/project/contract/ir/llvm_ir.rs rename to crates/resolc/src/project/contract/ir/llvm_ir.rs diff --git a/crates/solidity/src/project/contract/ir/mod.rs b/crates/resolc/src/project/contract/ir/mod.rs similarity index 96% rename from crates/solidity/src/project/contract/ir/mod.rs rename to crates/resolc/src/project/contract/ir/mod.rs index 70f349d..0084823 100644 --- a/crates/solidity/src/project/contract/ir/mod.rs +++ b/crates/resolc/src/project/contract/ir/mod.rs @@ -8,7 +8,7 @@ use std::collections::HashSet; use serde::Deserialize; use serde::Serialize; -use crate::yul::parser::statement::object::Object; +use revive_yul::parser::statement::object::Object; use self::llvm_ir::LLVMIR; use self::yul::Yul; diff --git a/crates/solidity/src/project/contract/ir/yul.rs b/crates/resolc/src/project/contract/ir/yul.rs similarity index 95% rename from crates/solidity/src/project/contract/ir/yul.rs rename to crates/resolc/src/project/contract/ir/yul.rs index 97aa7ba..cc879a0 100644 --- a/crates/solidity/src/project/contract/ir/yul.rs +++ b/crates/resolc/src/project/contract/ir/yul.rs @@ -5,7 +5,7 @@ use std::collections::HashSet; use serde::Deserialize; use serde::Serialize; -use crate::yul::parser::statement::object::Object; +use revive_yul::parser::statement::object::Object; /// The contract Yul source code. #[derive(Debug, Serialize, Deserialize, Clone)] diff --git a/crates/solidity/src/project/contract/metadata.rs b/crates/resolc/src/project/contract/metadata.rs similarity index 100% rename from crates/solidity/src/project/contract/metadata.rs rename to crates/resolc/src/project/contract/metadata.rs diff --git a/crates/solidity/src/project/contract/mod.rs b/crates/resolc/src/project/contract/mod.rs similarity index 100% rename from crates/solidity/src/project/contract/mod.rs rename to crates/resolc/src/project/contract/mod.rs diff --git a/crates/solidity/src/project/mod.rs b/crates/resolc/src/project/mod.rs similarity index 99% rename from crates/solidity/src/project/mod.rs rename to crates/resolc/src/project/mod.rs index dc5d9a9..615527d 100644 --- a/crates/solidity/src/project/mod.rs +++ b/crates/resolc/src/project/mod.rs @@ -9,11 +9,14 @@ use std::path::Path; #[cfg(feature = "parallel")] use rayon::iter::{IntoParallelIterator, ParallelIterator}; -use revive_solc_json_interface::SolcStandardJsonOutput; use serde::Deserialize; use serde::Serialize; use sha3::Digest; +use revive_solc_json_interface::SolcStandardJsonOutput; +use revive_yul::lexer::Lexer; +use revive_yul::parser::statement::object::Object; + use crate::build::contract::Contract as ContractBuild; use crate::build::Build; use crate::missing_libraries::MissingLibraries; @@ -22,8 +25,6 @@ use crate::process::Process; use crate::project::contract::ir::IR; use crate::solc::version::Version as SolcVersion; use crate::solc::Compiler; -use crate::yul::lexer::Lexer; -use crate::yul::parser::statement::object::Object; use self::contract::Contract; diff --git a/crates/solidity/src/resolc/arguments.rs b/crates/resolc/src/resolc/arguments.rs similarity index 100% rename from crates/solidity/src/resolc/arguments.rs rename to crates/resolc/src/resolc/arguments.rs diff --git a/crates/solidity/src/resolc/main.rs b/crates/resolc/src/resolc/main.rs similarity index 89% rename from crates/solidity/src/resolc/main.rs rename to crates/resolc/src/resolc/main.rs index 7a68874..648418c 100644 --- a/crates/solidity/src/resolc/main.rs +++ b/crates/resolc/src/resolc/main.rs @@ -5,7 +5,7 @@ pub mod arguments; use std::io::Write; use std::str::FromStr; -use revive_solidity::Process; +use resolc::Process; use self::arguments::Arguments; @@ -36,7 +36,7 @@ fn main_inner() -> anyhow::Result<()> { std::io::stdout(), "{} version {}", env!("CARGO_PKG_DESCRIPTION"), - revive_solidity::ResolcVersion::default().long + resolc::ResolcVersion::default().long )?; return Ok(()); } @@ -45,8 +45,8 @@ fn main_inner() -> anyhow::Result<()> { writeln!( std::io::stdout(), ">={},<={}", - revive_solidity::SolcFirstSupportedVersion, - revive_solidity::SolcLastSupportedVersion, + resolc::SolcFirstSupportedVersion, + resolc::SolcLastSupportedVersion, )?; return Ok(()); } @@ -71,20 +71,20 @@ fn main_inner() -> anyhow::Result<()> { let mut infile = std::fs::File::open(fname)?; #[cfg(target_os = "emscripten")] { - return revive_solidity::WorkerProcess::run(Some(&mut infile)); + return resolc::WorkerProcess::run(Some(&mut infile)); } #[cfg(not(target_os = "emscripten"))] { - return revive_solidity::NativeProcess::run(Some(&mut infile)); + return resolc::NativeProcess::run(Some(&mut infile)); } } #[cfg(target_os = "emscripten")] { - return revive_solidity::WorkerProcess::run(None); + return resolc::WorkerProcess::run(None); } #[cfg(not(target_os = "emscripten"))] { - return revive_solidity::NativeProcess::run(None); + return resolc::NativeProcess::run(None); } } @@ -111,14 +111,16 @@ fn main_inner() -> anyhow::Result<()> { let mut solc = { #[cfg(target_os = "emscripten")] { - revive_solidity::SoljsonCompiler + resolc::SoljsonCompiler } #[cfg(not(target_os = "emscripten"))] { - revive_solidity::SolcCompiler::new(arguments.solc.unwrap_or_else(|| { - revive_solidity::SolcCompiler::DEFAULT_EXECUTABLE_NAME.to_owned() - }))? + resolc::SolcCompiler::new( + arguments + .solc + .unwrap_or_else(|| resolc::SolcCompiler::DEFAULT_EXECUTABLE_NAME.to_owned()), + )? } }; @@ -158,7 +160,7 @@ fn main_inner() -> anyhow::Result<()> { } let build = if arguments.yul { - revive_solidity::yul( + resolc::yul( input_files.as_slice(), &mut solc, optimizer_settings, @@ -168,7 +170,7 @@ fn main_inner() -> anyhow::Result<()> { memory_config, ) } else if arguments.llvm_ir { - revive_solidity::llvm_ir( + resolc::llvm_ir( input_files.as_slice(), optimizer_settings, include_metadata_hash, @@ -177,7 +179,7 @@ fn main_inner() -> anyhow::Result<()> { memory_config, ) } else if arguments.standard_json { - revive_solidity::standard_json( + resolc::standard_json( &mut solc, arguments.detect_missing_libraries, arguments.base_path, @@ -188,7 +190,7 @@ fn main_inner() -> anyhow::Result<()> { )?; return Ok(()); } else if let Some(format) = arguments.combined_json { - revive_solidity::combined_json( + resolc::combined_json( format, input_files.as_slice(), arguments.libraries, @@ -210,7 +212,7 @@ fn main_inner() -> anyhow::Result<()> { )?; return Ok(()); } else { - revive_solidity::standard_output( + resolc::standard_output( input_files.as_slice(), arguments.libraries, &mut solc, diff --git a/crates/solidity/src/solc/mod.rs b/crates/resolc/src/solc/mod.rs similarity index 100% rename from crates/solidity/src/solc/mod.rs rename to crates/resolc/src/solc/mod.rs diff --git a/crates/solidity/src/solc/solc_compiler.rs b/crates/resolc/src/solc/solc_compiler.rs similarity index 100% rename from crates/solidity/src/solc/solc_compiler.rs rename to crates/resolc/src/solc/solc_compiler.rs diff --git a/crates/solidity/src/solc/soljson_compiler.rs b/crates/resolc/src/solc/soljson_compiler.rs similarity index 100% rename from crates/solidity/src/solc/soljson_compiler.rs rename to crates/resolc/src/solc/soljson_compiler.rs diff --git a/crates/solidity/src/solc/version.rs b/crates/resolc/src/solc/version.rs similarity index 100% rename from crates/solidity/src/solc/version.rs rename to crates/resolc/src/solc/version.rs diff --git a/crates/solidity/src/test_utils.rs b/crates/resolc/src/test_utils.rs similarity index 100% rename from crates/solidity/src/test_utils.rs rename to crates/resolc/src/test_utils.rs diff --git a/crates/solidity/src/tests/cli-tests/jest.config.js b/crates/resolc/src/tests/cli-tests/jest.config.js similarity index 100% rename from crates/solidity/src/tests/cli-tests/jest.config.js rename to crates/resolc/src/tests/cli-tests/jest.config.js diff --git a/crates/solidity/src/tests/cli-tests/junit.xml b/crates/resolc/src/tests/cli-tests/junit.xml similarity index 100% rename from crates/solidity/src/tests/cli-tests/junit.xml rename to crates/resolc/src/tests/cli-tests/junit.xml diff --git a/crates/solidity/src/tests/cli-tests/package-lock.json b/crates/resolc/src/tests/cli-tests/package-lock.json similarity index 100% rename from crates/solidity/src/tests/cli-tests/package-lock.json rename to crates/resolc/src/tests/cli-tests/package-lock.json diff --git a/crates/solidity/src/tests/cli-tests/package.json b/crates/resolc/src/tests/cli-tests/package.json similarity index 100% rename from crates/solidity/src/tests/cli-tests/package.json rename to crates/resolc/src/tests/cli-tests/package.json diff --git a/crates/solidity/src/tests/cli-tests/src/contracts/compiled/1.json b/crates/resolc/src/tests/cli-tests/src/contracts/compiled/1.json similarity index 100% rename from crates/solidity/src/tests/cli-tests/src/contracts/compiled/1.json rename to crates/resolc/src/tests/cli-tests/src/contracts/compiled/1.json diff --git a/crates/solidity/src/tests/cli-tests/src/contracts/solidity/contract.sol b/crates/resolc/src/tests/cli-tests/src/contracts/solidity/contract.sol similarity index 100% rename from crates/solidity/src/tests/cli-tests/src/contracts/solidity/contract.sol rename to crates/resolc/src/tests/cli-tests/src/contracts/solidity/contract.sol diff --git a/crates/solidity/src/tests/cli-tests/src/contracts/yul/contract.yul b/crates/resolc/src/tests/cli-tests/src/contracts/yul/contract.yul similarity index 100% rename from crates/solidity/src/tests/cli-tests/src/contracts/yul/contract.yul rename to crates/resolc/src/tests/cli-tests/src/contracts/yul/contract.yul diff --git a/crates/solidity/src/tests/cli-tests/src/entities.ts b/crates/resolc/src/tests/cli-tests/src/entities.ts similarity index 100% rename from crates/solidity/src/tests/cli-tests/src/entities.ts rename to crates/resolc/src/tests/cli-tests/src/entities.ts diff --git a/crates/solidity/src/tests/cli-tests/src/helper.ts b/crates/resolc/src/tests/cli-tests/src/helper.ts similarity index 100% rename from crates/solidity/src/tests/cli-tests/src/helper.ts rename to crates/resolc/src/tests/cli-tests/src/helper.ts diff --git a/crates/solidity/src/tests/cli-tests/tests/asm.test.ts b/crates/resolc/src/tests/cli-tests/tests/asm.test.ts similarity index 100% rename from crates/solidity/src/tests/cli-tests/tests/asm.test.ts rename to crates/resolc/src/tests/cli-tests/tests/asm.test.ts diff --git a/crates/solidity/src/tests/cli-tests/tests/common.test.ts b/crates/resolc/src/tests/cli-tests/tests/common.test.ts similarity index 100% rename from crates/solidity/src/tests/cli-tests/tests/common.test.ts rename to crates/resolc/src/tests/cli-tests/tests/common.test.ts diff --git a/crates/solidity/src/tests/cli-tests/tests/yul.test.ts b/crates/resolc/src/tests/cli-tests/tests/yul.test.ts similarity index 100% rename from crates/solidity/src/tests/cli-tests/tests/yul.test.ts rename to crates/resolc/src/tests/cli-tests/tests/yul.test.ts diff --git a/crates/solidity/src/tests/cli-tests/tsconfig.json b/crates/resolc/src/tests/cli-tests/tsconfig.json similarity index 100% rename from crates/solidity/src/tests/cli-tests/tsconfig.json rename to crates/resolc/src/tests/cli-tests/tsconfig.json diff --git a/crates/solidity/src/tests/combined-json.tests.ts b/crates/resolc/src/tests/combined-json.tests.ts similarity index 100% rename from crates/solidity/src/tests/combined-json.tests.ts rename to crates/resolc/src/tests/combined-json.tests.ts diff --git a/crates/solidity/src/tests/factory_dependency.rs b/crates/resolc/src/tests/factory_dependency.rs similarity index 100% rename from crates/solidity/src/tests/factory_dependency.rs rename to crates/resolc/src/tests/factory_dependency.rs diff --git a/crates/solidity/src/tests/ir_artifacts.rs b/crates/resolc/src/tests/ir_artifacts.rs similarity index 100% rename from crates/solidity/src/tests/ir_artifacts.rs rename to crates/resolc/src/tests/ir_artifacts.rs diff --git a/crates/solidity/src/tests/libraries.rs b/crates/resolc/src/tests/libraries.rs similarity index 100% rename from crates/solidity/src/tests/libraries.rs rename to crates/resolc/src/tests/libraries.rs diff --git a/crates/solidity/src/tests/messages.rs b/crates/resolc/src/tests/messages.rs similarity index 100% rename from crates/solidity/src/tests/messages.rs rename to crates/resolc/src/tests/messages.rs diff --git a/crates/solidity/src/tests/mod.rs b/crates/resolc/src/tests/mod.rs similarity index 100% rename from crates/solidity/src/tests/mod.rs rename to crates/resolc/src/tests/mod.rs diff --git a/crates/solidity/src/tests/optimizer.rs b/crates/resolc/src/tests/optimizer.rs similarity index 100% rename from crates/solidity/src/tests/optimizer.rs rename to crates/resolc/src/tests/optimizer.rs diff --git a/crates/solidity/src/tests/remappings.rs b/crates/resolc/src/tests/remappings.rs similarity index 100% rename from crates/solidity/src/tests/remappings.rs rename to crates/resolc/src/tests/remappings.rs diff --git a/crates/solidity/src/tests/runtime_code.rs b/crates/resolc/src/tests/runtime_code.rs similarity index 100% rename from crates/solidity/src/tests/runtime_code.rs rename to crates/resolc/src/tests/runtime_code.rs diff --git a/crates/solidity/src/tests/unsupported_opcodes.rs b/crates/resolc/src/tests/unsupported_opcodes.rs similarity index 100% rename from crates/solidity/src/tests/unsupported_opcodes.rs rename to crates/resolc/src/tests/unsupported_opcodes.rs diff --git a/crates/solidity/src/version.rs b/crates/resolc/src/version.rs similarity index 100% rename from crates/solidity/src/version.rs rename to crates/resolc/src/version.rs diff --git a/crates/runner/Cargo.toml b/crates/runner/Cargo.toml index a07ee16..7cd1647 100644 --- a/crates/runner/Cargo.toml +++ b/crates/runner/Cargo.toml @@ -17,7 +17,7 @@ path = "src/main.rs" [features] std = ["polkadot-sdk/std"] default = ["solidity"] -solidity = ["revive-solidity", "revive-differential", "revive-llvm-context"] +solidity = ["resolc", "revive-differential", "revive-llvm-context"] [dependencies] env_logger = { workspace = true } @@ -39,6 +39,6 @@ polkadot-sdk.features = [ "pallet-timestamp" ] -revive-solidity = { workspace = true, optional = true } +resolc = { workspace = true, optional = true } revive-differential = { workspace = true, optional = true } revive-llvm-context = { workspace = true, optional = true } diff --git a/crates/runner/src/lib.rs b/crates/runner/src/lib.rs index c759d59..e289f86 100644 --- a/crates/runner/src/lib.rs +++ b/crates/runner/src/lib.rs @@ -44,7 +44,7 @@ pub use crate::specs::*; mod runtime; mod specs; -#[cfg(not(feature = "revive-solidity"))] +#[cfg(not(feature = "resolc"))] pub(crate) const NO_SOLIDITY_FRONTEND: &str = "revive-runner was built without the solidity frontend; please enable the 'solidity' feature!"; @@ -234,7 +234,7 @@ impl CallResult { #[derive(Clone, Debug, Serialize, Deserialize)] pub enum Code { - #[cfg(feature = "revive-solidity")] + #[cfg(feature = "resolc")] /// Compile a single solidity source and use the blob of `contract` Solidity { path: Option, @@ -270,7 +270,7 @@ impl From for pallet_revive::Code { let Ok(source_code) = std::fs::read_to_string(&path) else { panic!("Failed to reead source code from {}", path.display()); }; - pallet_revive::Code::Upload(revive_solidity::test_utils::compile_blob_with_options( + pallet_revive::Code::Upload(resolc::test_utils::compile_blob_with_options( &contract, &source_code, solc_optimizer.unwrap_or(true), diff --git a/crates/runner/src/specs.rs b/crates/runner/src/specs.rs index 96e81c3..db0a3e6 100644 --- a/crates/runner/src/specs.rs +++ b/crates/runner/src/specs.rs @@ -4,12 +4,12 @@ use serde::{Deserialize, Serialize}; use crate::*; use alloy_primitives::keccak256; -#[cfg(feature = "revive-solidity")] +#[cfg(feature = "resolc")] use alloy_primitives::Address; -#[cfg(feature = "revive-solidity")] +#[cfg(feature = "resolc")] +use resolc::test_utils::*; +#[cfg(feature = "resolc")] use revive_differential::{Evm, EvmLog}; -#[cfg(feature = "revive-solidity")] -use revive_solidity::test_utils::*; const SPEC_MARKER_BEGIN: &str = "/* runner.json"; const SPEC_MARKER_END: &str = "*/"; @@ -256,7 +256,7 @@ impl Specs { }; match code { - #[cfg(feature = "revive-solidity")] + #[cfg(feature = "resolc")] Code::Bytes(bytes) if bytes.is_empty() => { let contract_source = match std::fs::read_to_string(contract_path) { Err(err) => panic!("unable to read {contract_path}: {err}"), @@ -264,9 +264,9 @@ impl Specs { }; *bytes = compile_blob(contract_name, &contract_source) } - #[cfg(not(feature = "revive-solidity"))] + #[cfg(not(feature = "resolc"))] Code::Bytes(_) => panic!("{NO_SOLIDITY_FRONTEND}"), - #[cfg(feature = "revive-solidity")] + #[cfg(feature = "resolc")] Code::Solidity { path, .. } if path.is_none() => *path = Some(contract_path.into()), _ => continue, } diff --git a/crates/yul/Cargo.toml b/crates/yul/Cargo.toml new file mode 100644 index 0000000..87ee61a --- /dev/null +++ b/crates/yul/Cargo.toml @@ -0,0 +1,20 @@ +[package] +name = "revive-yul" +description = "The revive YUL parser library." +version.workspace = true +authors.workspace = true +license.workspace = true +edition.workspace = true +repository.workspace = true +rust-version.workspace = true + +[dependencies] +anyhow = { workspace = true } +inkwell = { workspace = true } +num = { workspace = true } +regex = { workspace = true } +serde = { workspace = true } +thiserror = { workspace = true } + +revive-common = { workspace = true } +revive-llvm-context = { workspace = true } diff --git a/crates/solidity/src/yul/error.rs b/crates/yul/src/error.rs similarity index 74% rename from crates/solidity/src/yul/error.rs rename to crates/yul/src/error.rs index 51c84a5..a1c0dbc 100644 --- a/crates/solidity/src/yul/error.rs +++ b/crates/yul/src/error.rs @@ -1,7 +1,7 @@ //! The Yul IR error. -use crate::yul::lexer::error::Error as LexerError; -use crate::yul::parser::error::Error as ParserError; +use crate::lexer::error::Error as LexerError; +use crate::parser::error::Error as ParserError; /// The Yul IR error. #[derive(Debug, thiserror::Error, PartialEq, Eq)] diff --git a/crates/solidity/src/yul/lexer/error.rs b/crates/yul/src/lexer/error.rs similarity index 88% rename from crates/solidity/src/yul/lexer/error.rs rename to crates/yul/src/lexer/error.rs index db388f1..9467b11 100644 --- a/crates/solidity/src/yul/lexer/error.rs +++ b/crates/yul/src/lexer/error.rs @@ -1,6 +1,6 @@ //! The Yul IR lexer error. -use crate::yul::lexer::token::location::Location; +use crate::lexer::token::location::Location; /// The Yul IR lexer error. #[derive(Debug, thiserror::Error, PartialEq, Eq)] diff --git a/crates/solidity/src/yul/lexer/mod.rs b/crates/yul/src/lexer/mod.rs similarity index 98% rename from crates/solidity/src/yul/lexer/mod.rs rename to crates/yul/src/lexer/mod.rs index 1ae2bea..ca26e8f 100644 --- a/crates/solidity/src/yul/lexer/mod.rs +++ b/crates/yul/src/lexer/mod.rs @@ -42,6 +42,7 @@ impl Lexer { } /// Advances the lexer, returning the next lexeme. + #[allow(clippy::should_implement_trait)] pub fn next(&mut self) -> Result { if let Some(peeked) = self.peeked.take() { return Ok(peeked); diff --git a/crates/solidity/src/yul/lexer/tests.rs b/crates/yul/src/lexer/tests.rs similarity index 94% rename from crates/solidity/src/yul/lexer/tests.rs rename to crates/yul/src/lexer/tests.rs index 0bd3966..0a7b980 100644 --- a/crates/solidity/src/yul/lexer/tests.rs +++ b/crates/yul/src/lexer/tests.rs @@ -1,9 +1,9 @@ //! The Yul IR lexer tests. -use crate::yul::lexer::error::Error; -use crate::yul::lexer::token::lexeme::Lexeme; -use crate::yul::lexer::token::location::Location; -use crate::yul::lexer::Lexer; +use crate::lexer::error::Error; +use crate::lexer::token::lexeme::Lexeme; +use crate::lexer::token::location::Location; +use crate::lexer::Lexer; #[test] fn default() { diff --git a/crates/solidity/src/yul/lexer/token/lexeme/comment/mod.rs b/crates/yul/src/lexer/token/lexeme/comment/mod.rs similarity index 95% rename from crates/solidity/src/yul/lexer/token/lexeme/comment/mod.rs rename to crates/yul/src/lexer/token/lexeme/comment/mod.rs index 35dcda6..1d4aaf3 100644 --- a/crates/solidity/src/yul/lexer/token/lexeme/comment/mod.rs +++ b/crates/yul/src/lexer/token/lexeme/comment/mod.rs @@ -3,7 +3,7 @@ pub mod multi_line; pub mod single_line; -use crate::yul::lexer::token::Token; +use crate::lexer::token::Token; use self::multi_line::Comment as MultiLineComment; use self::single_line::Comment as SingleLineComment; diff --git a/crates/solidity/src/yul/lexer/token/lexeme/comment/multi_line.rs b/crates/yul/src/lexer/token/lexeme/comment/multi_line.rs similarity index 89% rename from crates/solidity/src/yul/lexer/token/lexeme/comment/multi_line.rs rename to crates/yul/src/lexer/token/lexeme/comment/multi_line.rs index 84dbf58..fbdfbe9 100644 --- a/crates/solidity/src/yul/lexer/token/lexeme/comment/multi_line.rs +++ b/crates/yul/src/lexer/token/lexeme/comment/multi_line.rs @@ -1,8 +1,8 @@ //! The multi-line comment lexeme. -use crate::yul::lexer::token::lexeme::Lexeme; -use crate::yul::lexer::token::location::Location; -use crate::yul::lexer::token::Token; +use crate::lexer::token::lexeme::Lexeme; +use crate::lexer::token::location::Location; +use crate::lexer::token::Token; /// The multi-line comment lexeme. #[derive(Debug, Clone, PartialEq, Eq)] diff --git a/crates/solidity/src/yul/lexer/token/lexeme/comment/single_line.rs b/crates/yul/src/lexer/token/lexeme/comment/single_line.rs similarity index 83% rename from crates/solidity/src/yul/lexer/token/lexeme/comment/single_line.rs rename to crates/yul/src/lexer/token/lexeme/comment/single_line.rs index c30c2e5..b99f448 100644 --- a/crates/solidity/src/yul/lexer/token/lexeme/comment/single_line.rs +++ b/crates/yul/src/lexer/token/lexeme/comment/single_line.rs @@ -1,8 +1,8 @@ //! The single-line comment lexeme. -use crate::yul::lexer::token::lexeme::Lexeme; -use crate::yul::lexer::token::location::Location; -use crate::yul::lexer::token::Token; +use crate::lexer::token::lexeme::Lexeme; +use crate::lexer::token::location::Location; +use crate::lexer::token::Token; /// The single-line comment lexeme. #[derive(Debug, Clone, PartialEq, Eq)] diff --git a/crates/solidity/src/yul/lexer/token/lexeme/identifier.rs b/crates/yul/src/lexer/token/lexeme/identifier.rs similarity index 90% rename from crates/solidity/src/yul/lexer/token/lexeme/identifier.rs rename to crates/yul/src/lexer/token/lexeme/identifier.rs index df2aa89..36552b1 100644 --- a/crates/solidity/src/yul/lexer/token/lexeme/identifier.rs +++ b/crates/yul/src/lexer/token/lexeme/identifier.rs @@ -1,9 +1,9 @@ //! The identifier lexeme. -use crate::yul::lexer::token::lexeme::keyword::Keyword; -use crate::yul::lexer::token::lexeme::Lexeme; -use crate::yul::lexer::token::location::Location; -use crate::yul::lexer::token::Token; +use crate::lexer::token::lexeme::keyword::Keyword; +use crate::lexer::token::lexeme::Lexeme; +use crate::lexer::token::location::Location; +use crate::lexer::token::Token; /// The identifier lexeme. #[derive(Debug, Clone, PartialEq, Eq)] diff --git a/crates/solidity/src/yul/lexer/token/lexeme/keyword.rs b/crates/yul/src/lexer/token/lexeme/keyword.rs similarity index 93% rename from crates/solidity/src/yul/lexer/token/lexeme/keyword.rs rename to crates/yul/src/lexer/token/lexeme/keyword.rs index c32cbe4..0ff7e14 100644 --- a/crates/solidity/src/yul/lexer/token/lexeme/keyword.rs +++ b/crates/yul/src/lexer/token/lexeme/keyword.rs @@ -1,10 +1,10 @@ //! The keyword lexeme. -use crate::yul::lexer::token::lexeme::literal::boolean::Boolean as BooleanLiteral; -use crate::yul::lexer::token::lexeme::literal::Literal; -use crate::yul::lexer::token::lexeme::Lexeme; -use crate::yul::lexer::token::location::Location; -use crate::yul::lexer::token::Token; +use crate::lexer::token::lexeme::literal::boolean::Boolean as BooleanLiteral; +use crate::lexer::token::lexeme::literal::Literal; +use crate::lexer::token::lexeme::Lexeme; +use crate::lexer::token::location::Location; +use crate::lexer::token::Token; /// The keyword lexeme. #[derive(Debug, Clone, PartialEq, Eq)] diff --git a/crates/solidity/src/yul/lexer/token/lexeme/literal/boolean.rs b/crates/yul/src/lexer/token/lexeme/literal/boolean.rs similarity index 95% rename from crates/solidity/src/yul/lexer/token/lexeme/literal/boolean.rs rename to crates/yul/src/lexer/token/lexeme/literal/boolean.rs index 6d11f18..57a5678 100644 --- a/crates/solidity/src/yul/lexer/token/lexeme/literal/boolean.rs +++ b/crates/yul/src/lexer/token/lexeme/literal/boolean.rs @@ -3,7 +3,7 @@ use serde::Deserialize; use serde::Serialize; -use crate::yul::lexer::token::lexeme::keyword::Keyword; +use crate::lexer::token::lexeme::keyword::Keyword; /// The boolean literal lexeme. #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq)] diff --git a/crates/solidity/src/yul/lexer/token/lexeme/literal/integer.rs b/crates/yul/src/lexer/token/lexeme/literal/integer.rs similarity index 94% rename from crates/solidity/src/yul/lexer/token/lexeme/literal/integer.rs rename to crates/yul/src/lexer/token/lexeme/literal/integer.rs index 354ed58..909cb3a 100644 --- a/crates/solidity/src/yul/lexer/token/lexeme/literal/integer.rs +++ b/crates/yul/src/lexer/token/lexeme/literal/integer.rs @@ -3,10 +3,10 @@ use serde::Deserialize; use serde::Serialize; -use crate::yul::lexer::token::lexeme::Lexeme; -use crate::yul::lexer::token::lexeme::Literal; -use crate::yul::lexer::token::location::Location; -use crate::yul::lexer::token::Token; +use crate::lexer::token::lexeme::Lexeme; +use crate::lexer::token::lexeme::Literal; +use crate::lexer::token::location::Location; +use crate::lexer::token::Token; /// The integer literal lexeme. #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq)] diff --git a/crates/solidity/src/yul/lexer/token/lexeme/literal/mod.rs b/crates/yul/src/lexer/token/lexeme/literal/mod.rs similarity index 100% rename from crates/solidity/src/yul/lexer/token/lexeme/literal/mod.rs rename to crates/yul/src/lexer/token/lexeme/literal/mod.rs diff --git a/crates/solidity/src/yul/lexer/token/lexeme/literal/string.rs b/crates/yul/src/lexer/token/lexeme/literal/string.rs similarity index 92% rename from crates/solidity/src/yul/lexer/token/lexeme/literal/string.rs rename to crates/yul/src/lexer/token/lexeme/literal/string.rs index 458b6a1..835f3a5 100644 --- a/crates/solidity/src/yul/lexer/token/lexeme/literal/string.rs +++ b/crates/yul/src/lexer/token/lexeme/literal/string.rs @@ -3,10 +3,10 @@ use serde::Deserialize; use serde::Serialize; -use crate::yul::lexer::token::lexeme::Lexeme; -use crate::yul::lexer::token::lexeme::Literal; -use crate::yul::lexer::token::location::Location; -use crate::yul::lexer::token::Token; +use crate::lexer::token::lexeme::Lexeme; +use crate::lexer::token::lexeme::Literal; +use crate::lexer::token::location::Location; +use crate::lexer::token::Token; /// The string literal lexeme. #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq)] diff --git a/crates/solidity/src/yul/lexer/token/lexeme/mod.rs b/crates/yul/src/lexer/token/lexeme/mod.rs similarity index 100% rename from crates/solidity/src/yul/lexer/token/lexeme/mod.rs rename to crates/yul/src/lexer/token/lexeme/mod.rs diff --git a/crates/solidity/src/yul/lexer/token/lexeme/symbol.rs b/crates/yul/src/lexer/token/lexeme/symbol.rs similarity index 92% rename from crates/solidity/src/yul/lexer/token/lexeme/symbol.rs rename to crates/yul/src/lexer/token/lexeme/symbol.rs index 0cbcfa7..0f8b128 100644 --- a/crates/solidity/src/yul/lexer/token/lexeme/symbol.rs +++ b/crates/yul/src/lexer/token/lexeme/symbol.rs @@ -1,8 +1,8 @@ //! The symbol lexeme. -use crate::yul::lexer::token::lexeme::Lexeme; -use crate::yul::lexer::token::location::Location; -use crate::yul::lexer::token::Token; +use crate::lexer::token::lexeme::Lexeme; +use crate::lexer::token::location::Location; +use crate::lexer::token::Token; /// The symbol lexeme. #[derive(Debug, Clone, PartialEq, Eq)] diff --git a/crates/solidity/src/yul/lexer/token/location.rs b/crates/yul/src/lexer/token/location.rs similarity index 100% rename from crates/solidity/src/yul/lexer/token/location.rs rename to crates/yul/src/lexer/token/location.rs diff --git a/crates/solidity/src/yul/lexer/token/mod.rs b/crates/yul/src/lexer/token/mod.rs similarity index 100% rename from crates/solidity/src/yul/lexer/token/mod.rs rename to crates/yul/src/lexer/token/mod.rs diff --git a/crates/solidity/src/yul/mod.rs b/crates/yul/src/lib.rs similarity index 100% rename from crates/solidity/src/yul/mod.rs rename to crates/yul/src/lib.rs diff --git a/crates/solidity/src/yul/parser/error.rs b/crates/yul/src/parser/error.rs similarity index 97% rename from crates/solidity/src/yul/parser/error.rs rename to crates/yul/src/parser/error.rs index 33daf3e..5627e7d 100644 --- a/crates/solidity/src/yul/parser/error.rs +++ b/crates/yul/src/parser/error.rs @@ -2,7 +2,7 @@ use std::collections::BTreeSet; -use crate::yul::lexer::token::location::Location; +use crate::lexer::token::location::Location; /// The Yul IR parser error. #[derive(Debug, thiserror::Error, PartialEq, Eq)] diff --git a/crates/solidity/src/yul/parser/identifier.rs b/crates/yul/src/parser/identifier.rs similarity index 87% rename from crates/solidity/src/yul/parser/identifier.rs rename to crates/yul/src/parser/identifier.rs index 44e1bb8..bfb86bc 100644 --- a/crates/solidity/src/yul/parser/identifier.rs +++ b/crates/yul/src/parser/identifier.rs @@ -3,13 +3,13 @@ use serde::Deserialize; use serde::Serialize; -use crate::yul::error::Error; -use crate::yul::lexer::token::lexeme::symbol::Symbol; -use crate::yul::lexer::token::lexeme::Lexeme; -use crate::yul::lexer::token::location::Location; -use crate::yul::lexer::token::Token; -use crate::yul::lexer::Lexer; -use crate::yul::parser::r#type::Type; +use crate::error::Error; +use crate::lexer::token::lexeme::symbol::Symbol; +use crate::lexer::token::lexeme::Lexeme; +use crate::lexer::token::location::Location; +use crate::lexer::token::Token; +use crate::lexer::Lexer; +use crate::parser::r#type::Type; /// The YUL source code identifier. #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq)] @@ -50,7 +50,7 @@ impl Identifier { let mut expected_comma = false; loop { - let token = crate::yul::parser::take_or_next(initial.take(), lexer)?; + let token = crate::parser::take_or_next(initial.take(), lexer)?; match token { Token { @@ -81,7 +81,7 @@ impl Identifier { let mut expected_comma = false; loop { - let token = crate::yul::parser::take_or_next(initial.take(), lexer)?; + let token = crate::parser::take_or_next(initial.take(), lexer)?; match token { Token { diff --git a/crates/solidity/src/yul/parser/mod.rs b/crates/yul/src/parser/mod.rs similarity index 76% rename from crates/solidity/src/yul/parser/mod.rs rename to crates/yul/src/parser/mod.rs index eae6176..a5167ea 100644 --- a/crates/solidity/src/yul/parser/mod.rs +++ b/crates/yul/src/parser/mod.rs @@ -5,9 +5,9 @@ pub mod identifier; pub mod statement; pub mod r#type; -use crate::yul::lexer::error::Error as LexerError; -use crate::yul::lexer::token::Token; -use crate::yul::lexer::Lexer; +use crate::lexer::error::Error as LexerError; +use crate::lexer::token::Token; +use crate::lexer::Lexer; /// Returns the `token` value if it is `Some(_)`, otherwise takes the next token from the `stream`. pub fn take_or_next(mut token: Option, lexer: &mut Lexer) -> Result { diff --git a/crates/solidity/src/yul/parser/statement/assignment.rs b/crates/yul/src/parser/statement/assignment.rs similarity index 91% rename from crates/solidity/src/yul/parser/statement/assignment.rs rename to crates/yul/src/parser/statement/assignment.rs index 0a13d18..c3079e2 100644 --- a/crates/solidity/src/yul/parser/statement/assignment.rs +++ b/crates/yul/src/parser/statement/assignment.rs @@ -6,15 +6,15 @@ use inkwell::types::BasicType; use serde::Deserialize; use serde::Serialize; -use crate::yul::error::Error; -use crate::yul::lexer::token::lexeme::symbol::Symbol; -use crate::yul::lexer::token::lexeme::Lexeme; -use crate::yul::lexer::token::location::Location; -use crate::yul::lexer::token::Token; -use crate::yul::lexer::Lexer; -use crate::yul::parser::error::Error as ParserError; -use crate::yul::parser::identifier::Identifier; -use crate::yul::parser::statement::expression::Expression; +use crate::error::Error; +use crate::lexer::token::lexeme::symbol::Symbol; +use crate::lexer::token::lexeme::Lexeme; +use crate::lexer::token::location::Location; +use crate::lexer::token::Token; +use crate::lexer::Lexer; +use crate::parser::error::Error as ParserError; +use crate::parser::identifier::Identifier; +use crate::parser::statement::expression::Expression; /// The Yul assignment expression statement. #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq)] @@ -30,7 +30,7 @@ pub struct Assignment { impl Assignment { /// The element parser. pub fn parse(lexer: &mut Lexer, initial: Option) -> Result { - let token = crate::yul::parser::take_or_next(initial, lexer)?; + let token = crate::parser::take_or_next(initial, lexer)?; let (location, identifier) = match token { Token { @@ -75,7 +75,7 @@ impl Assignment { Some(Token::new(location, Lexeme::Identifier(identifier), length)), )?; - match crate::yul::parser::take_or_next(next, lexer)? { + match crate::parser::take_or_next(next, lexer)? { Token { lexeme: Lexeme::Symbol(Symbol::Assignment), .. diff --git a/crates/solidity/src/yul/parser/statement/block.rs b/crates/yul/src/parser/statement/block.rs similarity index 91% rename from crates/solidity/src/yul/parser/statement/block.rs rename to crates/yul/src/parser/statement/block.rs index b4ba92d..07d38c2 100644 --- a/crates/solidity/src/yul/parser/statement/block.rs +++ b/crates/yul/src/parser/statement/block.rs @@ -7,16 +7,16 @@ use serde::Serialize; use inkwell::debug_info::AsDIScope; -use crate::yul::error::Error; -use crate::yul::lexer::token::lexeme::symbol::Symbol; -use crate::yul::lexer::token::lexeme::Lexeme; -use crate::yul::lexer::token::location::Location; -use crate::yul::lexer::token::Token; -use crate::yul::lexer::Lexer; -use crate::yul::parser::error::Error as ParserError; -use crate::yul::parser::statement::assignment::Assignment; -use crate::yul::parser::statement::expression::Expression; -use crate::yul::parser::statement::Statement; +use crate::error::Error; +use crate::lexer::token::lexeme::symbol::Symbol; +use crate::lexer::token::lexeme::Lexeme; +use crate::lexer::token::location::Location; +use crate::lexer::token::Token; +use crate::lexer::Lexer; +use crate::parser::error::Error as ParserError; +use crate::parser::statement::assignment::Assignment; +use crate::parser::statement::expression::Expression; +use crate::parser::statement::Statement; /// The Yul source code block. #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq)] @@ -30,7 +30,7 @@ pub struct Block { impl Block { /// The element parser. pub fn parse(lexer: &mut Lexer, initial: Option) -> Result { - let token = crate::yul::parser::take_or_next(initial, lexer)?; + let token = crate::parser::take_or_next(initial, lexer)?; let mut statements = Vec::new(); @@ -53,7 +53,7 @@ impl Block { let mut remaining = None; loop { - match crate::yul::parser::take_or_next(remaining.take(), lexer)? { + match crate::parser::take_or_next(remaining.take(), lexer)? { token @ Token { lexeme: Lexeme::Keyword(_), .. @@ -221,10 +221,10 @@ where #[cfg(test)] mod tests { - use crate::yul::lexer::token::location::Location; - use crate::yul::lexer::Lexer; - use crate::yul::parser::error::Error; - use crate::yul::parser::statement::object::Object; + use crate::lexer::token::location::Location; + use crate::lexer::Lexer; + use crate::parser::error::Error; + use crate::parser::statement::object::Object; #[test] fn error_invalid_token_bracket_curly_left() { diff --git a/crates/solidity/src/yul/parser/statement/code.rs b/crates/yul/src/parser/statement/code.rs similarity index 78% rename from crates/solidity/src/yul/parser/statement/code.rs rename to crates/yul/src/parser/statement/code.rs index 6910da9..e550553 100644 --- a/crates/solidity/src/yul/parser/statement/code.rs +++ b/crates/yul/src/parser/statement/code.rs @@ -5,14 +5,14 @@ use std::collections::HashSet; use serde::Deserialize; use serde::Serialize; -use crate::yul::error::Error; -use crate::yul::lexer::token::lexeme::keyword::Keyword; -use crate::yul::lexer::token::lexeme::Lexeme; -use crate::yul::lexer::token::location::Location; -use crate::yul::lexer::token::Token; -use crate::yul::lexer::Lexer; -use crate::yul::parser::error::Error as ParserError; -use crate::yul::parser::statement::block::Block; +use crate::error::Error; +use crate::lexer::token::lexeme::keyword::Keyword; +use crate::lexer::token::lexeme::Lexeme; +use crate::lexer::token::location::Location; +use crate::lexer::token::Token; +use crate::lexer::Lexer; +use crate::parser::error::Error as ParserError; +use crate::parser::statement::block::Block; /// The YUL code entity, which is the first block of the object. #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq)] @@ -26,7 +26,7 @@ pub struct Code { impl Code { /// The element parser. pub fn parse(lexer: &mut Lexer, initial: Option) -> Result { - let token = crate::yul::parser::take_or_next(initial, lexer)?; + let token = crate::parser::take_or_next(initial, lexer)?; let location = match token { Token { @@ -68,10 +68,10 @@ where #[cfg(test)] mod tests { - use crate::yul::lexer::token::location::Location; - use crate::yul::lexer::Lexer; - use crate::yul::parser::error::Error; - use crate::yul::parser::statement::object::Object; + use crate::lexer::token::location::Location; + use crate::lexer::Lexer; + use crate::parser::error::Error; + use crate::parser::statement::object::Object; #[test] fn error_invalid_token_code() { diff --git a/crates/solidity/src/yul/parser/statement/expression/function_call/mod.rs b/crates/yul/src/parser/statement/expression/function_call/mod.rs similarity index 98% rename from crates/solidity/src/yul/parser/statement/expression/function_call/mod.rs rename to crates/yul/src/parser/statement/expression/function_call/mod.rs index 9ddb1a2..44bbf98 100644 --- a/crates/solidity/src/yul/parser/statement/expression/function_call/mod.rs +++ b/crates/yul/src/parser/statement/expression/function_call/mod.rs @@ -9,16 +9,16 @@ use inkwell::values::BasicValue; use serde::Deserialize; use serde::Serialize; -use crate::yul::error::Error; -use crate::yul::lexer::token::lexeme::literal::Literal as LexicalLiteral; -use crate::yul::lexer::token::lexeme::symbol::Symbol; -use crate::yul::lexer::token::lexeme::Lexeme; -use crate::yul::lexer::token::location::Location; -use crate::yul::lexer::token::Token; -use crate::yul::lexer::Lexer; -use crate::yul::parser::error::Error as ParserError; -use crate::yul::parser::statement::expression::literal::Literal; -use crate::yul::parser::statement::expression::Expression; +use crate::error::Error; +use crate::lexer::token::lexeme::literal::Literal as LexicalLiteral; +use crate::lexer::token::lexeme::symbol::Symbol; +use crate::lexer::token::lexeme::Lexeme; +use crate::lexer::token::location::Location; +use crate::lexer::token::Token; +use crate::lexer::Lexer; +use crate::parser::error::Error as ParserError; +use crate::parser::statement::expression::literal::Literal; +use crate::parser::statement::expression::Expression; use self::name::Name; @@ -36,7 +36,7 @@ pub struct FunctionCall { impl FunctionCall { /// The element parser. pub fn parse(lexer: &mut Lexer, initial: Option) -> Result { - let token = crate::yul::parser::take_or_next(initial, lexer)?; + let token = crate::parser::take_or_next(initial, lexer)?; let (location, name) = match token { Token { diff --git a/crates/solidity/src/yul/parser/statement/expression/function_call/name.rs b/crates/yul/src/parser/statement/expression/function_call/name.rs similarity index 100% rename from crates/solidity/src/yul/parser/statement/expression/function_call/name.rs rename to crates/yul/src/parser/statement/expression/function_call/name.rs diff --git a/crates/solidity/src/yul/parser/statement/expression/function_call/verbatim.rs b/crates/yul/src/parser/statement/expression/function_call/verbatim.rs similarity index 92% rename from crates/solidity/src/yul/parser/statement/expression/function_call/verbatim.rs rename to crates/yul/src/parser/statement/expression/function_call/verbatim.rs index 3d82098..9fc54a2 100644 --- a/crates/solidity/src/yul/parser/statement/expression/function_call/verbatim.rs +++ b/crates/yul/src/parser/statement/expression/function_call/verbatim.rs @@ -1,6 +1,6 @@ //! Translates the verbatim simulations. -use crate::yul::parser::statement::expression::function_call::FunctionCall; +use crate::parser::statement::expression::function_call::FunctionCall; /// Translates the verbatim simulations. pub fn verbatim<'ctx, D>( diff --git a/crates/solidity/src/yul/parser/statement/expression/literal.rs b/crates/yul/src/parser/statement/expression/literal.rs similarity index 92% rename from crates/solidity/src/yul/parser/statement/expression/literal.rs rename to crates/yul/src/parser/statement/expression/literal.rs index 9df512c..97d267d 100644 --- a/crates/solidity/src/yul/parser/statement/expression/literal.rs +++ b/crates/yul/src/parser/statement/expression/literal.rs @@ -7,17 +7,17 @@ use num::Zero; use serde::Deserialize; use serde::Serialize; -use crate::yul::error::Error; -use crate::yul::lexer::token::lexeme::literal::boolean::Boolean as BooleanLiteral; -use crate::yul::lexer::token::lexeme::literal::integer::Integer as IntegerLiteral; -use crate::yul::lexer::token::lexeme::literal::Literal as LexicalLiteral; -use crate::yul::lexer::token::lexeme::symbol::Symbol; -use crate::yul::lexer::token::lexeme::Lexeme; -use crate::yul::lexer::token::location::Location; -use crate::yul::lexer::token::Token; -use crate::yul::lexer::Lexer; -use crate::yul::parser::error::Error as ParserError; -use crate::yul::parser::r#type::Type; +use crate::error::Error; +use crate::lexer::token::lexeme::literal::boolean::Boolean as BooleanLiteral; +use crate::lexer::token::lexeme::literal::integer::Integer as IntegerLiteral; +use crate::lexer::token::lexeme::literal::Literal as LexicalLiteral; +use crate::lexer::token::lexeme::symbol::Symbol; +use crate::lexer::token::lexeme::Lexeme; +use crate::lexer::token::location::Location; +use crate::lexer::token::Token; +use crate::lexer::Lexer; +use crate::parser::error::Error as ParserError; +use crate::parser::r#type::Type; /// Represents a literal in YUL without differentiating its type. #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq)] @@ -33,7 +33,7 @@ pub struct Literal { impl Literal { /// The element parser. pub fn parse(lexer: &mut Lexer, initial: Option) -> Result { - let token = crate::yul::parser::take_or_next(initial, lexer)?; + let token = crate::parser::take_or_next(initial, lexer)?; let (location, literal) = match token { Token { diff --git a/crates/solidity/src/yul/parser/statement/expression/mod.rs b/crates/yul/src/parser/statement/expression/mod.rs similarity index 91% rename from crates/solidity/src/yul/parser/statement/expression/mod.rs rename to crates/yul/src/parser/statement/expression/mod.rs index c26820e..0bc0bd1 100644 --- a/crates/solidity/src/yul/parser/statement/expression/mod.rs +++ b/crates/yul/src/parser/statement/expression/mod.rs @@ -8,14 +8,14 @@ use std::collections::HashSet; use serde::Deserialize; use serde::Serialize; -use crate::yul::error::Error; -use crate::yul::lexer::token::lexeme::symbol::Symbol; -use crate::yul::lexer::token::lexeme::Lexeme; -use crate::yul::lexer::token::location::Location; -use crate::yul::lexer::token::Token; -use crate::yul::lexer::Lexer; -use crate::yul::parser::error::Error as ParserError; -use crate::yul::parser::identifier::Identifier; +use crate::error::Error; +use crate::lexer::token::lexeme::symbol::Symbol; +use crate::lexer::token::lexeme::Lexeme; +use crate::lexer::token::location::Location; +use crate::lexer::token::Token; +use crate::lexer::Lexer; +use crate::parser::error::Error as ParserError; +use crate::parser::identifier::Identifier; use self::function_call::FunctionCall; use self::literal::Literal; @@ -34,7 +34,7 @@ pub enum Expression { impl Expression { /// The element parser. pub fn parse(lexer: &mut Lexer, initial: Option) -> Result { - let token = crate::yul::parser::take_or_next(initial, lexer)?; + let token = crate::parser::take_or_next(initial, lexer)?; let (location, identifier) = match token { Token { diff --git a/crates/solidity/src/yul/parser/statement/for_loop.rs b/crates/yul/src/parser/statement/for_loop.rs similarity index 90% rename from crates/solidity/src/yul/parser/statement/for_loop.rs rename to crates/yul/src/parser/statement/for_loop.rs index c3d0c35..822e9b9 100644 --- a/crates/solidity/src/yul/parser/statement/for_loop.rs +++ b/crates/yul/src/parser/statement/for_loop.rs @@ -5,12 +5,12 @@ use std::collections::HashSet; use serde::Deserialize; use serde::Serialize; -use crate::yul::error::Error; -use crate::yul::lexer::token::location::Location; -use crate::yul::lexer::token::Token; -use crate::yul::lexer::Lexer; -use crate::yul::parser::statement::block::Block; -use crate::yul::parser::statement::expression::Expression; +use crate::error::Error; +use crate::lexer::token::location::Location; +use crate::lexer::token::Token; +use crate::lexer::Lexer; +use crate::parser::statement::block::Block; +use crate::parser::statement::expression::Expression; /// The Yul for-loop statement. #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq)] @@ -30,7 +30,7 @@ pub struct ForLoop { impl ForLoop { /// The element parser. pub fn parse(lexer: &mut Lexer, initial: Option) -> Result { - let token = crate::yul::parser::take_or_next(initial, lexer)?; + let token = crate::parser::take_or_next(initial, lexer)?; let location = token.location; let initializer = Block::parse(lexer, Some(token))?; diff --git a/crates/solidity/src/yul/parser/statement/function_definition.rs b/crates/yul/src/parser/statement/function_definition.rs similarity index 95% rename from crates/solidity/src/yul/parser/statement/function_definition.rs rename to crates/yul/src/parser/statement/function_definition.rs index 53f3759..e776e4b 100644 --- a/crates/solidity/src/yul/parser/statement/function_definition.rs +++ b/crates/yul/src/parser/statement/function_definition.rs @@ -8,16 +8,16 @@ use inkwell::types::BasicType; use serde::Deserialize; use serde::Serialize; -use crate::yul::error::Error; -use crate::yul::lexer::token::lexeme::symbol::Symbol; -use crate::yul::lexer::token::lexeme::Lexeme; -use crate::yul::lexer::token::location::Location; -use crate::yul::lexer::token::Token; -use crate::yul::lexer::Lexer; -use crate::yul::parser::error::Error as ParserError; -use crate::yul::parser::identifier::Identifier; -use crate::yul::parser::statement::block::Block; -use crate::yul::parser::statement::expression::function_call::name::Name as FunctionName; +use crate::error::Error; +use crate::lexer::token::lexeme::symbol::Symbol; +use crate::lexer::token::lexeme::Lexeme; +use crate::lexer::token::location::Location; +use crate::lexer::token::Token; +use crate::lexer::Lexer; +use crate::parser::error::Error as ParserError; +use crate::parser::identifier::Identifier; +use crate::parser::statement::block::Block; +use crate::parser::statement::expression::function_call::name::Name as FunctionName; /// The function definition statement. /// All functions are translated in two steps: @@ -48,7 +48,7 @@ impl FunctionDefinition { /// The element parser. pub fn parse(lexer: &mut Lexer, initial: Option) -> Result { - let token = crate::yul::parser::take_or_next(initial, lexer)?; + let token = crate::parser::take_or_next(initial, lexer)?; let (location, identifier) = match token { Token { @@ -94,7 +94,7 @@ impl FunctionDefinition { } let (arguments, next) = Identifier::parse_typed_list(lexer, None)?; - match crate::yul::parser::take_or_next(next, lexer)? { + match crate::parser::take_or_next(next, lexer)? { Token { lexeme: Lexeme::Symbol(Symbol::ParenthesisRight), .. @@ -328,10 +328,10 @@ where mod tests { use std::collections::BTreeSet; - use crate::yul::lexer::token::location::Location; - use crate::yul::lexer::Lexer; - use crate::yul::parser::error::Error; - use crate::yul::parser::statement::object::Object; + use crate::lexer::token::location::Location; + use crate::lexer::Lexer; + use crate::parser::error::Error; + use crate::parser::statement::object::Object; #[test] fn error_invalid_token_identifier() { diff --git a/crates/solidity/src/yul/parser/statement/if_conditional.rs b/crates/yul/src/parser/statement/if_conditional.rs similarity index 87% rename from crates/solidity/src/yul/parser/statement/if_conditional.rs rename to crates/yul/src/parser/statement/if_conditional.rs index 96178c7..6703152 100644 --- a/crates/solidity/src/yul/parser/statement/if_conditional.rs +++ b/crates/yul/src/parser/statement/if_conditional.rs @@ -5,12 +5,12 @@ use std::collections::HashSet; use serde::Deserialize; use serde::Serialize; -use crate::yul::error::Error; -use crate::yul::lexer::token::location::Location; -use crate::yul::lexer::token::Token; -use crate::yul::lexer::Lexer; -use crate::yul::parser::statement::block::Block; -use crate::yul::parser::statement::expression::Expression; +use crate::error::Error; +use crate::lexer::token::location::Location; +use crate::lexer::token::Token; +use crate::lexer::Lexer; +use crate::parser::statement::block::Block; +use crate::parser::statement::expression::Expression; /// The Yul if-conditional statement. #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq)] @@ -26,7 +26,7 @@ pub struct IfConditional { impl IfConditional { /// The element parser. pub fn parse(lexer: &mut Lexer, initial: Option) -> Result { - let token = crate::yul::parser::take_or_next(initial, lexer)?; + let token = crate::parser::take_or_next(initial, lexer)?; let location = token.location; let condition = Expression::parse(lexer, Some(token))?; diff --git a/crates/solidity/src/yul/parser/statement/mod.rs b/crates/yul/src/parser/statement/mod.rs similarity index 94% rename from crates/solidity/src/yul/parser/statement/mod.rs rename to crates/yul/src/parser/statement/mod.rs index 89c35f6..ec3d6d1 100644 --- a/crates/solidity/src/yul/parser/statement/mod.rs +++ b/crates/yul/src/parser/statement/mod.rs @@ -16,13 +16,13 @@ use std::collections::HashSet; use serde::Deserialize; use serde::Serialize; -use crate::yul::error::Error; -use crate::yul::lexer::token::lexeme::keyword::Keyword; -use crate::yul::lexer::token::lexeme::Lexeme; -use crate::yul::lexer::token::location::Location; -use crate::yul::lexer::token::Token; -use crate::yul::lexer::Lexer; -use crate::yul::parser::error::Error as ParserError; +use crate::error::Error; +use crate::lexer::token::lexeme::keyword::Keyword; +use crate::lexer::token::lexeme::Lexeme; +use crate::lexer::token::location::Location; +use crate::lexer::token::Token; +use crate::lexer::Lexer; +use crate::parser::error::Error as ParserError; use self::assignment::Assignment; use self::block::Block; @@ -72,7 +72,7 @@ impl Statement { lexer: &mut Lexer, initial: Option, ) -> Result<(Self, Option), Error> { - let token = crate::yul::parser::take_or_next(initial, lexer)?; + let token = crate::parser::take_or_next(initial, lexer)?; match token { token @ Token { diff --git a/crates/solidity/src/yul/parser/statement/object.rs b/crates/yul/src/parser/statement/object.rs similarity index 95% rename from crates/solidity/src/yul/parser/statement/object.rs rename to crates/yul/src/parser/statement/object.rs index 8ba5cc4..7af755d 100644 --- a/crates/solidity/src/yul/parser/statement/object.rs +++ b/crates/yul/src/parser/statement/object.rs @@ -7,16 +7,16 @@ use inkwell::debug_info::AsDIScope; use serde::Deserialize; use serde::Serialize; -use crate::yul::error::Error; -use crate::yul::lexer::token::lexeme::keyword::Keyword; -use crate::yul::lexer::token::lexeme::literal::Literal; -use crate::yul::lexer::token::lexeme::symbol::Symbol; -use crate::yul::lexer::token::lexeme::Lexeme; -use crate::yul::lexer::token::location::Location; -use crate::yul::lexer::token::Token; -use crate::yul::lexer::Lexer; -use crate::yul::parser::error::Error as ParserError; -use crate::yul::parser::statement::code::Code; +use crate::error::Error; +use crate::lexer::token::lexeme::keyword::Keyword; +use crate::lexer::token::lexeme::literal::Literal; +use crate::lexer::token::lexeme::symbol::Symbol; +use crate::lexer::token::lexeme::Lexeme; +use crate::lexer::token::location::Location; +use crate::lexer::token::Token; +use crate::lexer::Lexer; +use crate::parser::error::Error as ParserError; +use crate::parser::statement::code::Code; /// The upper-level YUL object, representing the deploy code. #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq)] @@ -38,7 +38,7 @@ pub struct Object { impl Object { /// The element parser. pub fn parse(lexer: &mut Lexer, initial: Option) -> Result { - let token = crate::yul::parser::take_or_next(initial, lexer)?; + let token = crate::parser::take_or_next(initial, lexer)?; let location = match token { Token { @@ -299,10 +299,10 @@ where #[cfg(test)] mod tests { - use crate::yul::lexer::token::location::Location; - use crate::yul::lexer::Lexer; - use crate::yul::parser::error::Error; - use crate::yul::parser::statement::object::Object; + use crate::lexer::token::location::Location; + use crate::lexer::Lexer; + use crate::parser::error::Error; + use crate::parser::statement::object::Object; #[test] fn error_invalid_token_object() { diff --git a/crates/solidity/src/yul/parser/statement/switch/case.rs b/crates/yul/src/parser/statement/switch/case.rs similarity index 77% rename from crates/solidity/src/yul/parser/statement/switch/case.rs rename to crates/yul/src/parser/statement/switch/case.rs index 948b5d1..8ba71ef 100644 --- a/crates/solidity/src/yul/parser/statement/switch/case.rs +++ b/crates/yul/src/parser/statement/switch/case.rs @@ -5,14 +5,14 @@ use std::collections::HashSet; use serde::Deserialize; use serde::Serialize; -use crate::yul::error::Error; -use crate::yul::lexer::token::lexeme::Lexeme; -use crate::yul::lexer::token::location::Location; -use crate::yul::lexer::token::Token; -use crate::yul::lexer::Lexer; -use crate::yul::parser::error::Error as ParserError; -use crate::yul::parser::statement::block::Block; -use crate::yul::parser::statement::expression::literal::Literal; +use crate::error::Error; +use crate::lexer::token::lexeme::Lexeme; +use crate::lexer::token::location::Location; +use crate::lexer::token::Token; +use crate::lexer::Lexer; +use crate::parser::error::Error as ParserError; +use crate::parser::statement::block::Block; +use crate::parser::statement::expression::literal::Literal; /// The Yul switch statement case. #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq)] @@ -28,7 +28,7 @@ pub struct Case { impl Case { /// The element parser. pub fn parse(lexer: &mut Lexer, initial: Option) -> Result { - let token = crate::yul::parser::take_or_next(initial, lexer)?; + let token = crate::parser::take_or_next(initial, lexer)?; let (location, literal) = match token { token @ Token { @@ -63,10 +63,10 @@ impl Case { #[cfg(test)] mod tests { - use crate::yul::lexer::token::location::Location; - use crate::yul::lexer::Lexer; - use crate::yul::parser::error::Error; - use crate::yul::parser::statement::object::Object; + use crate::lexer::token::location::Location; + use crate::lexer::Lexer; + use crate::parser::error::Error; + use crate::parser::statement::object::Object; #[test] fn error_invalid_token_literal() { diff --git a/crates/solidity/src/yul/parser/statement/switch/mod.rs b/crates/yul/src/parser/statement/switch/mod.rs similarity index 89% rename from crates/solidity/src/yul/parser/statement/switch/mod.rs rename to crates/yul/src/parser/statement/switch/mod.rs index 177003c..5c63edf 100644 --- a/crates/solidity/src/yul/parser/statement/switch/mod.rs +++ b/crates/yul/src/parser/statement/switch/mod.rs @@ -7,15 +7,15 @@ use std::collections::HashSet; use serde::Deserialize; use serde::Serialize; -use crate::yul::error::Error; -use crate::yul::lexer::token::lexeme::keyword::Keyword; -use crate::yul::lexer::token::lexeme::Lexeme; -use crate::yul::lexer::token::location::Location; -use crate::yul::lexer::token::Token; -use crate::yul::lexer::Lexer; -use crate::yul::parser::error::Error as ParserError; -use crate::yul::parser::statement::block::Block; -use crate::yul::parser::statement::expression::Expression; +use crate::error::Error; +use crate::lexer::token::lexeme::keyword::Keyword; +use crate::lexer::token::lexeme::Lexeme; +use crate::lexer::token::location::Location; +use crate::lexer::token::Token; +use crate::lexer::Lexer; +use crate::parser::error::Error as ParserError; +use crate::parser::statement::block::Block; +use crate::parser::statement::expression::Expression; use self::case::Case; @@ -45,7 +45,7 @@ pub enum State { impl Switch { /// The element parser. pub fn parse(lexer: &mut Lexer, initial: Option) -> Result { - let mut token = crate::yul::parser::take_or_next(initial, lexer)?; + let mut token = crate::parser::take_or_next(initial, lexer)?; let location = token.location; let mut state = State::CaseOrDefaultKeyword; @@ -177,10 +177,10 @@ where #[cfg(test)] mod tests { - use crate::yul::lexer::token::location::Location; - use crate::yul::lexer::Lexer; - use crate::yul::parser::error::Error; - use crate::yul::parser::statement::object::Object; + use crate::lexer::token::location::Location; + use crate::lexer::Lexer; + use crate::parser::error::Error; + use crate::parser::statement::object::Object; #[test] fn error_invalid_token_case() { diff --git a/crates/solidity/src/yul/parser/statement/variable_declaration.rs b/crates/yul/src/parser/statement/variable_declaration.rs similarity index 90% rename from crates/solidity/src/yul/parser/statement/variable_declaration.rs rename to crates/yul/src/parser/statement/variable_declaration.rs index 3024bc0..fdf917e 100644 --- a/crates/solidity/src/yul/parser/statement/variable_declaration.rs +++ b/crates/yul/src/parser/statement/variable_declaration.rs @@ -7,16 +7,16 @@ use inkwell::values::BasicValue; use serde::Deserialize; use serde::Serialize; -use crate::yul::error::Error; -use crate::yul::lexer::token::lexeme::symbol::Symbol; -use crate::yul::lexer::token::lexeme::Lexeme; -use crate::yul::lexer::token::location::Location; -use crate::yul::lexer::token::Token; -use crate::yul::lexer::Lexer; -use crate::yul::parser::error::Error as ParserError; -use crate::yul::parser::identifier::Identifier; -use crate::yul::parser::statement::expression::function_call::name::Name as FunctionName; -use crate::yul::parser::statement::expression::Expression; +use crate::error::Error; +use crate::lexer::token::lexeme::symbol::Symbol; +use crate::lexer::token::lexeme::Lexeme; +use crate::lexer::token::location::Location; +use crate::lexer::token::Token; +use crate::lexer::Lexer; +use crate::parser::error::Error as ParserError; +use crate::parser::identifier::Identifier; +use crate::parser::statement::expression::function_call::name::Name as FunctionName; +use crate::parser::statement::expression::Expression; /// The Yul variable declaration statement. #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq)] @@ -35,7 +35,7 @@ impl VariableDeclaration { lexer: &mut Lexer, initial: Option, ) -> Result<(Self, Option), Error> { - let token = crate::yul::parser::take_or_next(initial, lexer)?; + let token = crate::parser::take_or_next(initial, lexer)?; let location = token.location; let (bindings, next) = Identifier::parse_typed_list(lexer, Some(token))?; @@ -52,7 +52,7 @@ impl VariableDeclaration { } } - match crate::yul::parser::take_or_next(next, lexer)? { + match crate::parser::take_or_next(next, lexer)? { Token { lexeme: Lexeme::Symbol(Symbol::Assignment), .. @@ -220,10 +220,10 @@ where #[cfg(test)] mod tests { - use crate::yul::lexer::token::location::Location; - use crate::yul::lexer::Lexer; - use crate::yul::parser::error::Error; - use crate::yul::parser::statement::object::Object; + use crate::lexer::token::location::Location; + use crate::lexer::Lexer; + use crate::parser::error::Error; + use crate::parser::statement::object::Object; #[test] fn error_reserved_identifier() { diff --git a/crates/solidity/src/yul/parser/type.rs b/crates/yul/src/parser/type.rs similarity index 86% rename from crates/solidity/src/yul/parser/type.rs rename to crates/yul/src/parser/type.rs index ab01396..ec4d8c4 100644 --- a/crates/solidity/src/yul/parser/type.rs +++ b/crates/yul/src/parser/type.rs @@ -3,12 +3,12 @@ use serde::Deserialize; use serde::Serialize; -use crate::yul::error::Error; -use crate::yul::lexer::token::lexeme::keyword::Keyword; -use crate::yul::lexer::token::lexeme::Lexeme; -use crate::yul::lexer::token::Token; -use crate::yul::lexer::Lexer; -use crate::yul::parser::error::Error as ParserError; +use crate::error::Error; +use crate::lexer::token::lexeme::keyword::Keyword; +use crate::lexer::token::lexeme::Lexeme; +use crate::lexer::token::Token; +use crate::lexer::Lexer; +use crate::parser::error::Error as ParserError; /// The YUL source code type. /// The type is not currently in use, so all values have the `uint256` type by default. @@ -33,7 +33,7 @@ impl Default for Type { impl Type { /// The element parser. pub fn parse(lexer: &mut Lexer, initial: Option) -> Result { - let token = crate::yul::parser::take_or_next(initial, lexer)?; + let token = crate::parser::take_or_next(initial, lexer)?; match token { Token { diff --git a/package-lock.json b/package-lock.json index 36f7a1b..9c88c29 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6,7 +6,7 @@ "": { "name": "root", "workspaces": [ - "crates/solidity/src/tests/cli-tests", + "crates/resolc/src/tests/cli-tests", "js/emscripten", "js/resolc" ], @@ -16,7 +16,7 @@ "typescript-eslint": "^8.13.0" } }, - "crates/solidity/src/tests/cli-tests": { + "crates/resolc/src/tests/cli-tests": { "version": "1.0.0", "license": "MIT", "devDependencies": { @@ -87,24 +87,24 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.26.2", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", - "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", + "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-validator-identifier": "^7.25.9", + "@babel/helper-validator-identifier": "^7.27.1", "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" + "picocolors": "^1.1.1" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/compat-data": { - "version": "7.26.8", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.26.8.tgz", - "integrity": "sha512-oH5UPLMWR3L2wEFLnFJ1TZXqHufiTKAiLfqw5zkhS4dKXLJ10yVztfil/twG8EDTA4F/tvVNw9nOl4ZMslB8rQ==", + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.27.2.tgz", + "integrity": "sha512-TUtMJYRPyUb/9aU8f3K0mjmjf6M9N5Woshn2CS6nqJSeJtTtQcpLUXjGt9vbF8ZGff0El99sWkLgzwW3VXnxZQ==", "dev": true, "license": "MIT", "engines": { @@ -112,22 +112,22 @@ } }, "node_modules/@babel/core": { - "version": "7.26.10", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.26.10.tgz", - "integrity": "sha512-vMqyb7XCDMPvJFFOaT9kxtiRh42GwlZEg1/uIgtZshS5a/8OaduUfCi7kynKgc3Tw/6Uo2D+db9qBttghhmxwQ==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.27.1.tgz", + "integrity": "sha512-IaaGWsQqfsQWVLqMn9OB92MNN7zukfVA4s7KKAI0KfrrDsZ0yhi5uV4baBuLuN7n3vsZpwP8asPPcVwApxvjBQ==", "dev": true, "license": "MIT", "dependencies": { "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.26.2", - "@babel/generator": "^7.26.10", - "@babel/helper-compilation-targets": "^7.26.5", - "@babel/helper-module-transforms": "^7.26.0", - "@babel/helpers": "^7.26.10", - "@babel/parser": "^7.26.10", - "@babel/template": "^7.26.9", - "@babel/traverse": "^7.26.10", - "@babel/types": "^7.26.10", + "@babel/code-frame": "^7.27.1", + "@babel/generator": "^7.27.1", + "@babel/helper-compilation-targets": "^7.27.1", + "@babel/helper-module-transforms": "^7.27.1", + "@babel/helpers": "^7.27.1", + "@babel/parser": "^7.27.1", + "@babel/template": "^7.27.1", + "@babel/traverse": "^7.27.1", + "@babel/types": "^7.27.1", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -153,14 +153,14 @@ } }, "node_modules/@babel/generator": { - "version": "7.27.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.27.0.tgz", - "integrity": "sha512-VybsKvpiN1gU1sdMZIp7FcqphVVKEwcuj02x73uvcHE0PTihx1nlBcowYWhDwjpoAXRv43+gDzyggGnn1XZhVw==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.27.1.tgz", + "integrity": "sha512-UnJfnIpc/+JO0/+KRVQNGU+y5taA5vCbwN8+azkX6beii/ZF+enZJSOKo11ZSzGJjlNfJHfQtmQT8H+9TXPG2w==", "dev": true, "license": "MIT", "dependencies": { - "@babel/parser": "^7.27.0", - "@babel/types": "^7.27.0", + "@babel/parser": "^7.27.1", + "@babel/types": "^7.27.1", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^3.0.2" @@ -170,14 +170,14 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.27.0", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.0.tgz", - "integrity": "sha512-LVk7fbXml0H2xH34dFzKQ7TDZ2G4/rVTOrq9V+icbbadjbVxxeFeDsNHv2SrZeWoA+6ZiTyWYWtScEIW07EAcA==", + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz", + "integrity": "sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.26.8", - "@babel/helper-validator-option": "^7.25.9", + "@babel/compat-data": "^7.27.2", + "@babel/helper-validator-option": "^7.27.1", "browserslist": "^4.24.0", "lru-cache": "^5.1.1", "semver": "^6.3.1" @@ -197,29 +197,29 @@ } }, "node_modules/@babel/helper-module-imports": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.25.9.tgz", - "integrity": "sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz", + "integrity": "sha512-0gSFWUPNXNopqtIPQvlD5WgXYI5GY2kP2cCvoT8kczjbfcfuIljTbcWrulD1CIPIX2gt1wghbDy08yE1p+/r3w==", "dev": true, "license": "MIT", "dependencies": { - "@babel/traverse": "^7.25.9", - "@babel/types": "^7.25.9" + "@babel/traverse": "^7.27.1", + "@babel/types": "^7.27.1" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.26.0.tgz", - "integrity": "sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.27.1.tgz", + "integrity": "sha512-9yHn519/8KvTU5BjTVEEeIM3w9/2yXNKoD82JifINImhpKkARMJKPP59kLo+BafpdN5zgNeIcS4jsGDmd3l58g==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-module-imports": "^7.25.9", - "@babel/helper-validator-identifier": "^7.25.9", - "@babel/traverse": "^7.25.9" + "@babel/helper-module-imports": "^7.27.1", + "@babel/helper-validator-identifier": "^7.27.1", + "@babel/traverse": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -229,9 +229,9 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.26.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.26.5.tgz", - "integrity": "sha512-RS+jZcRdZdRFzMyr+wcsaqOmld1/EqTghfaBGQQd/WnRdzdlvSZ//kF7U8VQTxf1ynZ4cjUcYgjVGx13ewNPMg==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.27.1.tgz", + "integrity": "sha512-1gn1Up5YXka3YYAHGKpbideQ5Yjf1tDa9qYcgysz+cNCXukyLl6DjPXhD3VRwSb8c0J9tA4b2+rHEZtc6R0tlw==", "dev": true, "license": "MIT", "engines": { @@ -239,9 +239,9 @@ } }, "node_modules/@babel/helper-string-parser": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", - "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", + "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", "dev": true, "license": "MIT", "engines": { @@ -249,9 +249,9 @@ } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", - "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz", + "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==", "dev": true, "license": "MIT", "engines": { @@ -259,9 +259,9 @@ } }, "node_modules/@babel/helper-validator-option": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.25.9.tgz", - "integrity": "sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz", + "integrity": "sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==", "dev": true, "license": "MIT", "engines": { @@ -269,27 +269,27 @@ } }, "node_modules/@babel/helpers": { - "version": "7.27.0", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.27.0.tgz", - "integrity": "sha512-U5eyP/CTFPuNE3qk+WZMxFkp/4zUzdceQlfzf7DdGdhp+Fezd7HD+i8Y24ZuTMKX3wQBld449jijbGq6OdGNQg==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.27.1.tgz", + "integrity": "sha512-FCvFTm0sWV8Fxhpp2McP5/W53GPllQ9QeQ7SiqGWjMf/LVG07lFa5+pgK05IRhVwtvafT22KF+ZSnM9I545CvQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/template": "^7.27.0", - "@babel/types": "^7.27.0" + "@babel/template": "^7.27.1", + "@babel/types": "^7.27.1" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/parser": { - "version": "7.27.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.27.0.tgz", - "integrity": "sha512-iaepho73/2Pz7w2eMS0Q5f83+0RKI7i4xmiYeBmDzfRVbQtTOG7Ts0S4HzJVsTMGI9keU8rNfuZr8DKfSt7Yyg==", + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.27.2.tgz", + "integrity": "sha512-QYLs8299NA7WM/bZAdp+CviYYkVoYXlDW2rzliy3chxd1PQjej7JORuMJDJXJUb9g0TT+B99EwaVLKmX+sPXWw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.27.0" + "@babel/types": "^7.27.1" }, "bin": { "parser": "bin/babel-parser.js" @@ -354,13 +354,13 @@ } }, "node_modules/@babel/plugin-syntax-import-attributes": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.26.0.tgz", - "integrity": "sha512-e2dttdsJ1ZTpi3B9UYGLw41hifAubg19AtCu/2I/F1QNVclOBr1dYpTdmdyZ84Xiz43BS/tCUkMAZNLv12Pi+A==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.27.1.tgz", + "integrity": "sha512-oFT0FrKHgF53f4vOsZGi2Hh3I35PfSmVs4IBFLFj4dnafP+hIWDLg3VyKmUHfLoLHlyxY4C7DGtmHuJgn+IGww==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -396,13 +396,13 @@ } }, "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.25.9.tgz", - "integrity": "sha512-ld6oezHQMZsZfp6pWtbjaNDF2tiiCYYDqQszHt5VV437lewP9aSi2Of99CK0D0XB21k7FLgnLcmQKyKzynfeAA==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.27.1.tgz", + "integrity": "sha512-y8YTNIeKoyhGd9O0Jiyzyyqk8gdjnumGTQPsz0xOZOQ2RmkVJeZ1vmmfIvFEKqucBG6axJGBZDE/7iI5suUI/w==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -522,13 +522,13 @@ } }, "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.25.9.tgz", - "integrity": "sha512-hjMgRy5hb8uJJjUcdWunWVcoi9bGpJp8p5Ol1229PoN6aytsLwNMgmdftO23wnCLMfVmTwZDWMPNq/D1SY60JQ==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.27.1.tgz", + "integrity": "sha512-xfYCBMxveHrRMnAWl1ZlPXOZjzkN82THFvLhQhFXFt81Z5HnN+EtUkZhv/zcKpmT3fzmWZB0ywiBrbC3vogbwQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -538,32 +538,32 @@ } }, "node_modules/@babel/template": { - "version": "7.27.0", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.0.tgz", - "integrity": "sha512-2ncevenBqXI6qRMukPlXwHKHchC7RyMuu4xv5JBXRfOGVcTy1mXCD12qrp7Jsoxll1EV3+9sE4GugBVRjT2jFA==", + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz", + "integrity": "sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.26.2", - "@babel/parser": "^7.27.0", - "@babel/types": "^7.27.0" + "@babel/code-frame": "^7.27.1", + "@babel/parser": "^7.27.2", + "@babel/types": "^7.27.1" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.27.0", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.27.0.tgz", - "integrity": "sha512-19lYZFzYVQkkHkl4Cy4WrAVcqBkgvV2YM2TU3xG6DIwO7O3ecbDPfW3yM3bjAGcqcQHi+CCtjMR3dIEHxsd6bA==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.27.1.tgz", + "integrity": "sha512-ZCYtZciz1IWJB4U61UPu4KEaqyfj+r5T1Q5mqPo+IBpcG9kHv30Z0aD8LXPgC1trYa6rK0orRyAhqUgk4MjmEg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.26.2", - "@babel/generator": "^7.27.0", - "@babel/parser": "^7.27.0", - "@babel/template": "^7.27.0", - "@babel/types": "^7.27.0", + "@babel/code-frame": "^7.27.1", + "@babel/generator": "^7.27.1", + "@babel/parser": "^7.27.1", + "@babel/template": "^7.27.1", + "@babel/types": "^7.27.1", "debug": "^4.3.1", "globals": "^11.1.0" }, @@ -582,14 +582,14 @@ } }, "node_modules/@babel/types": { - "version": "7.27.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.27.0.tgz", - "integrity": "sha512-H45s8fVLYjbhFH62dIJ3WtmJ6RSPt/3DRO0ZcT2SUiYiQyz3BLVb9ADEnLl91m74aQPS3AzzeajZHYOalWe3bg==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.27.1.tgz", + "integrity": "sha512-+EzkxvLNfiUeKMgy/3luqfsCWFRXLb7U6wNQTk60tovuckwB15B191tJWvpp4HjiQWdJkCxO3Wbvc6jlk3Xb2Q==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.25.9", - "@babel/helper-validator-identifier": "^7.25.9" + "@babel/helper-string-parser": "^7.27.1", + "@babel/helper-validator-identifier": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -603,9 +603,9 @@ "license": "MIT" }, "node_modules/@eslint-community/eslint-utils": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.6.1.tgz", - "integrity": "sha512-KTsJMmobmbrFLe3LDh0PC2FXpcSYJt/MLjlkh/9LEnmKYLSYmT/0EW9JWANjeoemiuZrmogti0tW5Ch+qNUYDw==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.7.0.tgz", + "integrity": "sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==", "license": "MIT", "dependencies": { "eslint-visitor-keys": "^3.4.3" @@ -656,18 +656,18 @@ } }, "node_modules/@eslint/config-helpers": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.2.1.tgz", - "integrity": "sha512-RI17tsD2frtDu/3dmI7QRrD4bedNKPM08ziRYaC5AhkGrzIAJelm9kJU1TznK+apx6V+cqRz8tfpEeG3oIyjxw==", + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.2.2.tgz", + "integrity": "sha512-+GPzk8PlG0sPpzdU5ZvIRMPidzAnZDl/s9L+y13iodqvb8leL53bTannOrQ/Im7UkpsmFU5Ily5U60LWixnmLg==", "license": "Apache-2.0", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, "node_modules/@eslint/core": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.13.0.tgz", - "integrity": "sha512-yfkgDw1KR66rkT5A8ci4irzDysN7FRpq3ttJolR88OqQikAWqwA8j5VZyas+vjyBNFIJ7MfybJ9plMILI2UrCw==", + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.14.0.tgz", + "integrity": "sha512-qIbV0/JZr7iSDjqAc60IqbLdsj9GDt16xQtWD+B78d/HAlvysGdZZ6rpJHGAc2T0FQx1X6thsSPdnoiGKdNtdg==", "license": "Apache-2.0", "dependencies": { "@types/json-schema": "^7.0.15" @@ -700,12 +700,15 @@ } }, "node_modules/@eslint/js": { - "version": "9.25.1", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.25.1.tgz", - "integrity": "sha512-dEIwmjntEx8u3Uvv+kr3PDeeArL8Hw07H9kyYxCjnM9pBjfEhk6uLXSchxxzgiwtRhhzVzqmUSDFBOi1TuZ7qg==", + "version": "9.27.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.27.0.tgz", + "integrity": "sha512-G5JD9Tu5HJEu4z2Uo4aHY2sLV64B7CDMXxFzqzjl3NKd6RVzSXNoE80jk7Y0lJkTTkjiIhBAqmlYwjuBY3tvpA==", "license": "MIT", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" } }, "node_modules/@eslint/object-schema": { @@ -718,12 +721,12 @@ } }, "node_modules/@eslint/plugin-kit": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.8.tgz", - "integrity": "sha512-ZAoA40rNMPwSm+AeHpCq8STiNAwzWLJuP8Xv4CHIc9wv/PSuExjMrmjfYNj682vW0OOiZ1HKxzvjQr9XZIisQA==", + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.1.tgz", + "integrity": "sha512-0J+zgWxHN+xXONWIyPWKFMgVuJoZuGiIFu8yxk7RJjxkzpGmyja5wRFqZIVtjDVOQpV+Rw0iOAjYPE2eQyjr0w==", "license": "Apache-2.0", "dependencies": { - "@eslint/core": "^0.13.0", + "@eslint/core": "^0.14.0", "levn": "^0.4.1" }, "engines": { @@ -779,9 +782,9 @@ } }, "node_modules/@humanwhocodes/retry": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.2.tgz", - "integrity": "sha512-xeO57FpIu4p1Ri3Jq/EXq4ClRm86dVF2z/+kvFnyqVYRavTZmaFaUBbWCOuuTh0o/g7DSsk6kc2vrS4Vl5oPOQ==", + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", + "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", "license": "Apache-2.0", "engines": { "node": ">=18.18" @@ -1632,18 +1635,18 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "22.15.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.3.tgz", - "integrity": "sha512-lX7HFZeHf4QG/J7tBZqrCAXwz9J5RD56Y6MpP0eJkka8p+K0RY/yBTW7CYFJ4VGCclxqOLKmiGP5juQc6MKgcw==", + "version": "22.15.21", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.21.tgz", + "integrity": "sha512-EV/37Td6c+MgKAbkcLG6vqZ2zEYHD7bvSrzqqs2RIhbA6w3x+Dqz8MZM3sP6kGTeLrdoOgKZe+Xja7tUB2DNkQ==", "license": "MIT", "dependencies": { "undici-types": "~6.21.0" } }, "node_modules/@types/shelljs": { - "version": "0.8.15", - "resolved": "https://registry.npmjs.org/@types/shelljs/-/shelljs-0.8.15.tgz", - "integrity": "sha512-vzmnCHl6hViPu9GNLQJ+DZFd6BQI2DBTUeOvYHqkWQLMfKAAQYMb/xAmZkTogZI/vqXHCWkqDRymDI5p0QTi5Q==", + "version": "0.8.16", + "resolved": "https://registry.npmjs.org/@types/shelljs/-/shelljs-0.8.16.tgz", + "integrity": "sha512-40SUXiH0tZfAg/oKkkGF1kdHPAmE4slv2xAmbfa8VtE6ztHYwdpW2phlzHTVdJh5JOGqA3Cx1Hzp7kxFalKHYA==", "dev": true, "license": "MIT", "dependencies": { @@ -1676,20 +1679,20 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.31.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.31.1.tgz", - "integrity": "sha512-oUlH4h1ABavI4F0Xnl8/fOtML/eu8nI2A1nYd+f+55XI0BLu+RIqKoCiZKNo6DtqZBEQm5aNKA20G3Z5w3R6GQ==", + "version": "8.32.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.32.1.tgz", + "integrity": "sha512-6u6Plg9nP/J1GRpe/vcjjabo6Uc5YQPAMxsgQyGC/I0RuukiG1wIe3+Vtg3IrSCVJDmqK3j8adrtzXSENRtFgg==", "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.31.1", - "@typescript-eslint/type-utils": "8.31.1", - "@typescript-eslint/utils": "8.31.1", - "@typescript-eslint/visitor-keys": "8.31.1", + "@typescript-eslint/scope-manager": "8.32.1", + "@typescript-eslint/type-utils": "8.32.1", + "@typescript-eslint/utils": "8.32.1", + "@typescript-eslint/visitor-keys": "8.32.1", "graphemer": "^1.4.0", - "ignore": "^5.3.1", + "ignore": "^7.0.0", "natural-compare": "^1.4.0", - "ts-api-utils": "^2.0.1" + "ts-api-utils": "^2.1.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1704,16 +1707,25 @@ "typescript": ">=4.8.4 <5.9.0" } }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.4.tgz", + "integrity": "sha512-gJzzk+PQNznz8ysRrC0aOkBNVRBDtE1n53IqyqEf3PXrYwomFs5q4pGMizBMJF+ykh03insJ27hB8gSrD2Hn8A==", + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, "node_modules/@typescript-eslint/parser": { - "version": "8.31.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.31.1.tgz", - "integrity": "sha512-oU/OtYVydhXnumd0BobL9rkJg7wFJ9bFFPmSmB/bf/XWN85hlViji59ko6bSKBXyseT9V8l+CN1nwmlbiN0G7Q==", + "version": "8.32.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.32.1.tgz", + "integrity": "sha512-LKMrmwCPoLhM45Z00O1ulb6jwyVr2kr3XJp+G+tSEZcbauNnScewcQwtJqXDhXeYPDEjZ8C1SjXm015CirEmGg==", "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "8.31.1", - "@typescript-eslint/types": "8.31.1", - "@typescript-eslint/typescript-estree": "8.31.1", - "@typescript-eslint/visitor-keys": "8.31.1", + "@typescript-eslint/scope-manager": "8.32.1", + "@typescript-eslint/types": "8.32.1", + "@typescript-eslint/typescript-estree": "8.32.1", + "@typescript-eslint/visitor-keys": "8.32.1", "debug": "^4.3.4" }, "engines": { @@ -1729,13 +1741,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.31.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.31.1.tgz", - "integrity": "sha512-BMNLOElPxrtNQMIsFHE+3P0Yf1z0dJqV9zLdDxN/xLlWMlXK/ApEsVEKzpizg9oal8bAT5Sc7+ocal7AC1HCVw==", + "version": "8.32.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.32.1.tgz", + "integrity": "sha512-7IsIaIDeZn7kffk7qXC3o6Z4UblZJKV3UBpkvRNpr5NSyLji7tvTcvmnMNYuYLyh26mN8W723xpo3i4MlD33vA==", "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.31.1", - "@typescript-eslint/visitor-keys": "8.31.1" + "@typescript-eslint/types": "8.32.1", + "@typescript-eslint/visitor-keys": "8.32.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1746,15 +1758,15 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.31.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.31.1.tgz", - "integrity": "sha512-fNaT/m9n0+dpSp8G/iOQ05GoHYXbxw81x+yvr7TArTuZuCA6VVKbqWYVZrV5dVagpDTtj/O8k5HBEE/p/HM5LA==", + "version": "8.32.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.32.1.tgz", + "integrity": "sha512-mv9YpQGA8iIsl5KyUPi+FGLm7+bA4fgXaeRcFKRDRwDMu4iwrSHeDPipwueNXhdIIZltwCJv+NkxftECbIZWfA==", "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "8.31.1", - "@typescript-eslint/utils": "8.31.1", + "@typescript-eslint/typescript-estree": "8.32.1", + "@typescript-eslint/utils": "8.32.1", "debug": "^4.3.4", - "ts-api-utils": "^2.0.1" + "ts-api-utils": "^2.1.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1769,9 +1781,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.31.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.31.1.tgz", - "integrity": "sha512-SfepaEFUDQYRoA70DD9GtytljBePSj17qPxFHA/h3eg6lPTqGJ5mWOtbXCk1YrVU1cTJRd14nhaXWFu0l2troQ==", + "version": "8.32.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.32.1.tgz", + "integrity": "sha512-YmybwXUJcgGqgAp6bEsgpPXEg6dcCyPyCSr0CAAueacR/CCBi25G3V8gGQ2kRzQRBNol7VQknxMs9HvVa9Rvfg==", "license": "MIT", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1782,19 +1794,19 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.31.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.31.1.tgz", - "integrity": "sha512-kaA0ueLe2v7KunYOyWYtlf/QhhZb7+qh4Yw6Ni5kgukMIG+iP773tjgBiLWIXYumWCwEq3nLW+TUywEp8uEeag==", + "version": "8.32.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.32.1.tgz", + "integrity": "sha512-Y3AP9EIfYwBb4kWGb+simvPaqQoT5oJuzzj9m0i6FCY6SPvlomY2Ei4UEMm7+FXtlNJbor80ximyslzaQF6xhg==", "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.31.1", - "@typescript-eslint/visitor-keys": "8.31.1", + "@typescript-eslint/types": "8.32.1", + "@typescript-eslint/visitor-keys": "8.32.1", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", "minimatch": "^9.0.4", "semver": "^7.6.0", - "ts-api-utils": "^2.0.1" + "ts-api-utils": "^2.1.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1832,15 +1844,15 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.31.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.31.1.tgz", - "integrity": "sha512-2DSI4SNfF5T4oRveQ4nUrSjUqjMND0nLq9rEkz0gfGr3tg0S5KB6DhwR+WZPCjzkZl3cH+4x2ce3EsL50FubjQ==", + "version": "8.32.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.32.1.tgz", + "integrity": "sha512-DsSFNIgLSrc89gpq1LJB7Hm1YpuhK086DRDJSNrewcGvYloWW1vZLHBTIvarKZDcAORIy/uWNx8Gad+4oMpkSA==", "license": "MIT", "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.31.1", - "@typescript-eslint/types": "8.31.1", - "@typescript-eslint/typescript-estree": "8.31.1" + "@eslint-community/eslint-utils": "^4.7.0", + "@typescript-eslint/scope-manager": "8.32.1", + "@typescript-eslint/types": "8.32.1", + "@typescript-eslint/typescript-estree": "8.32.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1855,12 +1867,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.31.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.31.1.tgz", - "integrity": "sha512-I+/rgqOVBn6f0o7NDTmAPWWC6NuqhV174lfYvAm9fUaWeiefLdux9/YI3/nLugEn9L8fcSi0XmpKi/r5u0nmpw==", + "version": "8.32.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.32.1.tgz", + "integrity": "sha512-ar0tjQfObzhSaW3C3QNmTc5ofj0hDoNQ5XWrCy6zDyabdr0TWhCkClp+rywGNj/odAFBVzzJrK4tEq5M4Hmu4w==", "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.31.1", + "@typescript-eslint/types": "8.32.1", "eslint-visitor-keys": "^4.2.0" }, "engines": { @@ -1908,16 +1920,6 @@ "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/ansi-colors": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", - "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/ansi-escapes": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", @@ -2141,19 +2143,6 @@ "node": ">= 0.8" } }, - "node_modules/binary-extensions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", - "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -2184,9 +2173,9 @@ "license": "ISC" }, "node_modules/browserslist": { - "version": "4.24.4", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.4.tgz", - "integrity": "sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A==", + "version": "4.24.5", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.5.tgz", + "integrity": "sha512-FDToo4Wo82hIdgc1CQ+NQD0hEhmpPjrZ3hiUgwgOG6IuTdlpr8jdjyG24P6cNP1yJpTLzS5OcGgSw0xmDU1/Tw==", "dev": true, "funding": [ { @@ -2204,10 +2193,10 @@ ], "license": "MIT", "dependencies": { - "caniuse-lite": "^1.0.30001688", - "electron-to-chromium": "^1.5.73", + "caniuse-lite": "^1.0.30001716", + "electron-to-chromium": "^1.5.149", "node-releases": "^2.0.19", - "update-browserslist-db": "^1.1.1" + "update-browserslist-db": "^1.1.3" }, "bin": { "browserslist": "cli.js" @@ -2297,9 +2286,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001715", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001715.tgz", - "integrity": "sha512-7ptkFGMm2OAOgvZpwgA4yjQ5SQbrNVGdRjzH0pBdy1Fasvcr+KAeECmbCAECzTuDuoX0FCY8KzUxjf9+9kfZEw==", + "version": "1.0.30001718", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001718.tgz", + "integrity": "sha512-AflseV1ahcSunK53NfEs9gFWgOEmzr0f+kaMFA4xiLZlr9Hzt7HxcSpIFcnNCUkz6R6dWKa54rUz3HUmI3nVcw==", "dev": true, "funding": [ { @@ -2371,41 +2360,19 @@ } }, "node_modules/chokidar": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", - "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", "dev": true, "license": "MIT", "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" + "readdirp": "^4.0.1" }, "engines": { - "node": ">= 8.10.0" + "node": ">= 14.16.0" }, "funding": { "url": "https://paulmillr.com/funding/" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/chokidar/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" } }, "node_modules/ci-info": { @@ -2432,7 +2399,7 @@ "license": "MIT" }, "node_modules/cli-tests": { - "resolved": "crates/solidity/src/tests/cli-tests", + "resolved": "crates/resolc/src/tests/cli-tests", "link": true }, "node_modules/cliui": { @@ -2571,9 +2538,9 @@ } }, "node_modules/debug": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", - "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", + "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", "license": "MIT", "dependencies": { "ms": "^2.1.3" @@ -2601,9 +2568,9 @@ } }, "node_modules/dedent": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.3.tgz", - "integrity": "sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.6.0.tgz", + "integrity": "sha512-F1Z+5UCFpmQUzJa11agbyPVMbpgT/qA3/SKyJ1jyBgm7dUcUEa8v9JwDkerSQXfakBwFljIxhOJqGkjUwZ9FSA==", "dev": true, "license": "MIT", "peerDependencies": { @@ -2661,9 +2628,9 @@ } }, "node_modules/diff": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", - "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-7.0.0.tgz", + "integrity": "sha512-PJWHUb1RFevKCwaFA9RlG5tCd+FO5iRh9A8HEtkmBH2Li03iJriB6m6JIN4rGz3K3JLawI7/veA1xzRKP6ISBw==", "dev": true, "license": "BSD-3-Clause", "engines": { @@ -2719,9 +2686,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.5.144", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.144.tgz", - "integrity": "sha512-eJIaMRKeAzxfBSxtjYnoIAw/tdD6VIH6tHBZepZnAbE3Gyqqs5mGN87DvcldPUbVkIljTK8pY0CMcUljP64lfQ==", + "version": "1.5.158", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.158.tgz", + "integrity": "sha512-9vcp2xHhkvraY6AHw2WMi+GDSLPX42qe2xjYaVoZqFRJiOcilVQFq9mZmpuHEQpzlgGDelKlV7ZiGcmMsc8WxQ==", "dev": true, "license": "ISC" }, @@ -2811,19 +2778,19 @@ } }, "node_modules/eslint": { - "version": "9.25.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.25.1.tgz", - "integrity": "sha512-E6Mtz9oGQWDCpV12319d59n4tx9zOTXSTmc8BLVxBx+G/0RdM5MvEEJLU9c0+aleoePYYgVTOsRblx433qmhWQ==", + "version": "9.27.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.27.0.tgz", + "integrity": "sha512-ixRawFQuMB9DZ7fjU3iGGganFDp3+45bPOdaRurcFHSXO1e/sYwUX/FtQZpLZJR6SjMoJH8hR2pPEAfDyCoU2Q==", "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.12.1", "@eslint/config-array": "^0.20.0", "@eslint/config-helpers": "^0.2.1", - "@eslint/core": "^0.13.0", + "@eslint/core": "^0.14.0", "@eslint/eslintrc": "^3.3.1", - "@eslint/js": "9.25.1", - "@eslint/plugin-kit": "^0.2.8", + "@eslint/js": "9.27.0", + "@eslint/plugin-kit": "^0.3.1", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/retry": "^0.4.2", @@ -3658,19 +3625,6 @@ "dev": true, "license": "MIT" }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "license": "MIT", - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/is-core-module": { "version": "2.16.1", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", @@ -4802,25 +4756,25 @@ } }, "node_modules/mocha": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-11.1.0.tgz", - "integrity": "sha512-8uJR5RTC2NgpY3GrYcgpZrsEd9zKbPDpob1RezyR2upGHRQtHWofmzTMzTMSV6dru3tj5Ukt0+Vnq1qhFEEwAg==", + "version": "11.5.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-11.5.0.tgz", + "integrity": "sha512-VKDjhy6LMTKm0WgNEdlY77YVsD49LZnPSXJAaPNL9NRYQADxvORsyG1DIQY6v53BKTnlNbEE2MbVCDbnxr4K3w==", "dev": true, "license": "MIT", "dependencies": { - "ansi-colors": "^4.1.3", "browser-stdout": "^1.3.1", - "chokidar": "^3.5.3", + "chokidar": "^4.0.1", "debug": "^4.3.5", - "diff": "^5.2.0", + "diff": "^7.0.0", "escape-string-regexp": "^4.0.0", "find-up": "^5.0.0", "glob": "^10.4.5", "he": "^1.2.0", "js-yaml": "^4.1.0", "log-symbols": "^4.1.0", - "minimatch": "^5.1.6", + "minimatch": "^9.0.5", "ms": "^2.1.3", + "picocolors": "^1.1.1", "serialize-javascript": "^6.0.2", "strip-json-comments": "^3.1.1", "supports-color": "^8.1.1", @@ -4868,7 +4822,7 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/mocha/node_modules/glob/node_modules/minimatch": { + "node_modules/mocha/node_modules/minimatch": { "version": "9.0.5", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", @@ -4884,19 +4838,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/mocha/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/mocha/node_modules/supports-color": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", @@ -5538,16 +5479,17 @@ "license": "MIT" }, "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", "dev": true, "license": "MIT", - "dependencies": { - "picomatch": "^2.2.1" - }, "engines": { - "node": ">=8.10.0" + "node": ">= 14.18.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" } }, "node_modules/rechoir": { @@ -5728,9 +5670,9 @@ "license": "MIT" }, "node_modules/semver": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", - "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", "license": "ISC", "bin": { "semver": "bin/semver.js" @@ -5889,9 +5831,9 @@ } }, "node_modules/solc": { - "version": "0.8.29", - "resolved": "https://registry.npmjs.org/solc/-/solc-0.8.29.tgz", - "integrity": "sha512-M1hmcsejAtT1RWC+wy45Oi8a82nSnDl65wDzA3/8uWTC7R7VcnrMVIHv6/LHqnQPZ7OM2RIeKh3zpNo4E5lYbw==", + "version": "0.8.30", + "resolved": "https://registry.npmjs.org/solc/-/solc-0.8.30.tgz", + "integrity": "sha512-9Srk/gndtBmoUbg4CE6ypAzPQlElv8ntbnl6SigUBAzgXKn35v87sj04uZeoZWjtDkdzT0qKFcIo/wl63UMxdw==", "license": "MIT", "dependencies": { "command-exists": "^1.2.8", @@ -6108,14 +6050,14 @@ } }, "node_modules/terser": { - "version": "5.39.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.39.0.tgz", - "integrity": "sha512-LBAhFyLho16harJoWMg/nZsQYgTrg5jXOn2nCYjRUcZZEdE3qa2zb8QEDRUGVZBW4rlazf2fxkg8tztybTaqWw==", + "version": "5.39.2", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.39.2.tgz", + "integrity": "sha512-yEPUmWve+VA78bI71BW70Dh0TuV4HHd+I5SHOAfS1+QBOmvmCiiffgjR8ryyEd3KIfvPGFqoADt8LdQ6XpXIvg==", "dev": true, "license": "BSD-2-Clause", "dependencies": { "@jridgewell/source-map": "^0.3.3", - "acorn": "^8.8.2", + "acorn": "^8.14.0", "commander": "^2.20.0", "source-map-support": "~0.5.20" }, @@ -6203,9 +6145,9 @@ } }, "node_modules/ts-jest": { - "version": "29.3.2", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.3.2.tgz", - "integrity": "sha512-bJJkrWc6PjFVz5g2DGCNUo8z7oFEYaz1xP1NpeDU7KNLMWPpEyV8Chbpkn8xjzgRDpQhnGMyvyldoL7h8JXyug==", + "version": "29.3.4", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.3.4.tgz", + "integrity": "sha512-Iqbrm8IXOmV+ggWHOTEbjwyCf2xZlUMv5npExksXohL+tk8va4Fjhb+X2+Rt9NBmgO7bJ8WpnMLOwih/DnMlFA==", "dev": true, "license": "MIT", "dependencies": { @@ -6216,8 +6158,8 @@ "json5": "^2.2.3", "lodash.memoize": "^4.1.2", "make-error": "^1.3.6", - "semver": "^7.7.1", - "type-fest": "^4.39.1", + "semver": "^7.7.2", + "type-fest": "^4.41.0", "yargs-parser": "^21.1.1" }, "bin": { @@ -6253,9 +6195,9 @@ } }, "node_modules/ts-jest/node_modules/type-fest": { - "version": "4.40.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.40.1.tgz", - "integrity": "sha512-9YvLNnORDpI+vghLU/Nf+zSv0kL47KbVJ1o3sKgoTefl6i+zebxbiDQWoe/oWWqPhIgQdRZRT1KA9sCPL810SA==", + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz", + "integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==", "dev": true, "license": "(MIT OR CC0-1.0)", "engines": { @@ -6314,14 +6256,14 @@ } }, "node_modules/typescript-eslint": { - "version": "8.31.1", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.31.1.tgz", - "integrity": "sha512-j6DsEotD/fH39qKzXTQRwYYWlt7D+0HmfpOK+DVhwJOFLcdmn92hq3mBb7HlKJHbjjI/gTOqEcc9d6JfpFf/VA==", + "version": "8.32.1", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.32.1.tgz", + "integrity": "sha512-D7el+eaDHAmXvrZBy1zpzSNIRqnCOrkwTgZxTu3MUqRWk8k0q9m9Ho4+vPf7iHtgUfrK/o8IZaEApsxPlHTFCg==", "license": "MIT", "dependencies": { - "@typescript-eslint/eslint-plugin": "8.31.1", - "@typescript-eslint/parser": "8.31.1", - "@typescript-eslint/utils": "8.31.1" + "@typescript-eslint/eslint-plugin": "8.32.1", + "@typescript-eslint/parser": "8.32.1", + "@typescript-eslint/utils": "8.32.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" diff --git a/package.json b/package.json index 1a86896..0119354 100644 --- a/package.json +++ b/package.json @@ -2,14 +2,14 @@ "name": "root", "private": true, "scripts": { - "test:cli": "npm run test -w crates/solidity/src/tests/cli-tests", + "test:cli": "npm run test -w crates/resolc/src/tests/cli-tests", "test:wasm": "npm run test:node -w js/emscripten", "build:package": "npm run build:package -w js/emscripten", "lint": "npx eslint 'js/**/*.{cjs,mjs,ts}' && npx prettier --check '**/*.{mjs,cjs,ts}'", "lint:fix": "npx prettier --write '**/*.{mjs,cjs,ts}'" }, "workspaces": [ - "crates/solidity/src/tests/cli-tests", + "crates/resolc/src/tests/cli-tests", "js/emscripten", "js/resolc" ],