We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2409a0a commit ce3d1baCopy full SHA for ce3d1ba
README.md
@@ -8,12 +8,12 @@
8
JavaScript version ( Browser and Node.js ) of SimplePEG
9
10
```
11
-import {SPEG} from 'simplepeg';
12
-const parser = new SPEG();
+const simplepeg = require('simplepeg');
+const parser = new simplepeg.SPEG();
13
14
-parser.parse_grammar('GRAMMAR test a->"A";);
+parser.parse_grammar('GRAMMAR test a->"A";');
15
const ast = parser.parse_text('A');
16
-console.log(JSON.strinfigy(ast, null 4));
+console.log(JSON.stringify(ast, null, 4));
17
18
19
# Grammar example
0 commit comments