Files

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

24 lines
411 B
JavaScript
Raw Permalink 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": {
print: ({ node }) => node.text,
2022-07-20 23:18:24 +08:00
},
},
2018-01-09 14:27:26 +01:00
};