Skip to content

Commit 6d91087

Browse files
committed
SPEG - README.md updated
1 parent 573b923 commit 6d91087

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,12 @@
33
[![Coverage Status](https://coveralls.io/repos/github/SimplePEG/JavaScript/badge.svg?branch=master)](https://coveralls.io/github/SimplePEG/JavaScript?branch=master)
44

55
JavaScript version ( Browser and Node.js ) of SimplePEG
6+
7+
```
8+
import {SPEG} from 'simplepeg';
9+
const parser = new SPEG();
10+
11+
parser.parse_grammar('GRAMMAR test a->"A";);
12+
const ast = parser.parse_text('A');
13+
console.log(ast);
14+
```

0 commit comments

Comments
 (0)