-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add cli tool to dump solidity grammar definition as json
- Loading branch information
1 parent
ba075d1
commit 19d6ba6
Showing
4 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
[package] | ||
version.workspace = true | ||
rust-version.workspace = true | ||
edition.workspace = true | ||
# __SLANG_CARGO_PUBLISH_TEMPORARILY_DISABLED__ (keep in sync) | ||
# publish = true | ||
|
||
name = "slang_solidity_grammar_export" | ||
description = "" | ||
homepage = "https://nomicfoundation.github.io/slang/" | ||
repository = "https://github.com/NomicFoundation/slang/" | ||
authors = [ | ||
"Nomic Foundation <[email protected]>", | ||
"Antony Blakey <[email protected]>", | ||
"Igor Matuszewski <[email protected]>", | ||
"Omar Tawfik <[email protected]>", | ||
] | ||
|
||
[[bin]] | ||
name = "slang_solidity_grammar_export" | ||
path = "src/main.rs" | ||
|
||
[dependencies] | ||
serde_json = { workspace = true } | ||
solidity_language = { workspace = true } | ||
|
||
[lints] | ||
workspace = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
fn main() { | ||
println!( | ||
"{}", | ||
serde_json::to_string(&solidity_language::SolidityDefinition::create().sections).unwrap() | ||
); | ||
} |