Skip to content

Commit

Permalink
fix(tests): fix tests for coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
sam committed Nov 1, 2020
1 parent afb3c91 commit bbfa7e4
Show file tree
Hide file tree
Showing 10 changed files with 28,575 additions and 92 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:

strategy:
matrix:
node-version: ['10', '12', '14']
node-version: ["10", "12", "14"]

steps:
- uses: actions/checkout@v2
Expand All @@ -19,4 +19,3 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- run: npm install

18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
# Solidity PEGJS Grammar Parser
# Solidity PEGJS Grammar Parser

![nodejs](https://github.com/sambacha/solidity-pegjs-parser/workflows/nodejs/badge.svg)

> [GitHub Source](https://github.com/sambacha/solidity-pegjs-parser)
> [npm solidity-pegjs-parser](https://www.npmjs.com/package/solidity-pegjs-parser)

## Abstract

`$ npm install pegis-solidity`
Expand All @@ -22,9 +21,10 @@ pegis-solidity
### Usage

```js
import { solidityparser } from 'pegis-solidity';
import { solidityparser } from "pegis-solidity"
```
### command line

### command line

`$ ./node_modules/.boin/pegis-solidity $PWD/file_name.js`

Expand All @@ -39,6 +39,7 @@ contract MyContract {
mapping (uint => address) public addresses;
}
```

Generated output as AST output:

```json
Expand Down Expand Up @@ -90,18 +91,19 @@ Generated output as AST output:
```

```js
var SolidityParser = require("pegis-solidity");
var SolidityParser = require("pegis-solidity")

// Parse Solidity code as a string:
var result = SolidityParser.parse("contract { ... }");
var result = SolidityParser.parse("contract { ... }")

// Or, parse a file:
var result = SolidityParser.parseFile("./path/to/file.sol");
var result = SolidityParser.parseFile("./path/to/file.sol")
```

## Updates to Grammar
## Updates to Grammar

> A full list can be found under the `DIFF.md` document [here](/docs/DIFF.md)
```diff
HexStringLiteral
- = HexToken StringLiteral
Expand Down
Loading

0 comments on commit bbfa7e4

Please sign in to comment.