Files
test-repo/tests/integration/plugins/preprocess/plugin.cjs
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
418 B
JavaScript
Raw Normal View History

2018-01-09 14:27:26 +01:00
"use strict";
module.exports = {
languages: [
{
name: "foo",
parsers: ["foo-parser"],
extensions: [".foo"],
2022-07-20 23:18:24 +08:00
since: "1.0.0",
},
2018-01-09 14:27:26 +01:00
],
parsers: {
"foo-parser": {
2022-07-20 23:18:24 +08:00
preprocess: (text) => `preprocessed:${text}`,
parse: (text) => ({ text }),
astFormat: "foo-ast",
},
2018-01-09 14:27:26 +01:00
},
printers: {
"foo-ast": {
2022-07-20 23:18:24 +08:00
print: (path) => path.getValue().text,
},
},
2018-01-09 14:27:26 +01:00
};