Last change
on this file since 1ad8e64 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
328 bytes
|
Rev | Line | |
---|
[6a3a178] | 1 | #!/usr/bin/env node
|
---|
| 2 | /* eslint no-var: 0 */
|
---|
| 3 |
|
---|
| 4 | var parser = require("..");
|
---|
| 5 | var fs = require("fs");
|
---|
| 6 |
|
---|
| 7 | var filename = process.argv[2];
|
---|
| 8 | if (!filename) {
|
---|
| 9 | console.error("no filename specified");
|
---|
| 10 | } else {
|
---|
| 11 | var file = fs.readFileSync(filename, "utf8");
|
---|
| 12 | var ast = parser.parse(file);
|
---|
| 13 |
|
---|
| 14 | console.log(JSON.stringify(ast, null, " "));
|
---|
| 15 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.