Skip to content

Commit

Permalink
Fix some lints
Browse files Browse the repository at this point in the history
  • Loading branch information
Xanewok committed Dec 19, 2023
1 parent e45f45c commit 8bcc8ad
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ A file has to be parsed according to a specific Solidity [version](../../../soli
Start by adding the Slang package as a dependency to your project:

```bash
$ npm install "@nomicfoundation/slang"
npm install "@nomicfoundation/slang"
```

Using the API directly provides us with a more fine-grained control over the parsing process; we can parse individual rules like contracts, various definitions or even expressions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ After installing our CLI, you should now have `slang_solidity` in your $PATH. By

Usage:

```
```bash
slang_solidity parse [--json] --version <VERSION> <FILE_PATH>
```

Expand Down Expand Up @@ -75,8 +75,8 @@ This command parses the Solidity file and outputs the resulting CST in JSON form
Next, let's inspect the tokens in the JSON output:

```bash
$ JQ_QUERY='recurse | select(.Token?) | .Token'
$ cat output.json | jq "$JQ_QUERY"
JQ_QUERY='recurse | select(.Token?) | .Token'
cat output.json | jq "$JQ_QUERY"
```

This gives us a flat list of the Token nodes:
Expand Down Expand Up @@ -181,7 +181,7 @@ $ slang_solidity parse --json --version "$VERSION" file.sol | jq "$JQ_QUERY"
The Rust package is a regular crate published to crates.io, so we can add it to a project as a dependency with:

```bash
$ cargo add slang_solidity
cargo add slang_solidity
```

Using the API directly provides us with a more fine-grained control over the parsing process. We're not limited to parsing the input as a top-level source unit but we can parse individual rules like contracts, various definitions or even expressions.
Expand Down

0 comments on commit 8bcc8ad

Please sign in to comment.