You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
429 B
JavaScript
15 lines
429 B
JavaScript
"use strict";
|
|
|
|
const fs = require("fs");
|
|
const path = require("path");
|
|
const util = require("util");
|
|
|
|
const generate = require("../").generate;
|
|
const parser = require("../lib/parser");
|
|
|
|
let grammar = fs.readFileSync(path.join(__dirname, "test.pegjs"), { encoding: "utf-8" });
|
|
// let parseResult = parser.parse(grammar);
|
|
let parseResult = generate(grammar);
|
|
|
|
console.log(util.inspect(parseResult, { depth: null, colors: true }));
|