migrate to peggy

This commit is contained in:
marihachi 2021-06-05 12:43:10 +09:00
parent 70d49f9227
commit 813ab356ed
2 changed files with 4 additions and 5 deletions

View file

@ -7,8 +7,8 @@
"scripts": { "scripts": {
"build": "npm run tsc && npm run peg", "build": "npm run tsc && npm run peg",
"build-debug": "npm run tsc && npm run peg-debug", "build-debug": "npm run tsc && npm run peg-debug",
"peg": "pegjs -o built/parser.js --allowed-start-rules fullParser,inlineParser,plainParser src/parser.pegjs", "peg": "peggy -o built/parser.js --allowed-start-rules fullParser,inlineParser,plainParser src/parser.pegjs",
"peg-debug": "pegjs -o built/parser.js --allowed-start-rules fullParser,inlineParser,plainParser --trace src/parser.pegjs", "peg-debug": "peggy -o built/parser.js --allowed-start-rules fullParser,inlineParser,plainParser --trace src/parser.pegjs",
"tsc": "tsc", "tsc": "tsc",
"tsd": "tsd", "tsd": "tsd",
"parse": "node ./built/cli/parse", "parse": "node ./built/cli/parse",
@ -24,9 +24,8 @@
"devDependencies": { "devDependencies": {
"@types/mocha": "8.2.x", "@types/mocha": "8.2.x",
"@types/node": "14.14.x", "@types/node": "14.14.x",
"@types/pegjs": "0.10.x",
"mocha": "8.3.x", "mocha": "8.3.x",
"pegjs": "0.10.x", "peggy": "1.2.0",
"ts-node": "9.1.x", "ts-node": "9.1.x",
"tsd": "^0.14.0", "tsd": "^0.14.0",
"typescript": "4.2.x" "typescript": "4.2.x"

View file

@ -1,4 +1,4 @@
import peg from 'pegjs'; import peg from 'peggy';
import { MfmNode, MfmPlainNode } from './node'; import { MfmNode, MfmPlainNode } from './node';
import { stringifyNode, stringifyTree, inspectOne } from './util'; import { stringifyNode, stringifyTree, inspectOne } from './util';