Files
test-repo/tests_integration/plugins/preprocess/plugin.js
T

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

24 lines
405 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"],
since: "1.0.0"
}
],
parsers: {
"foo-parser": {
preprocess: text => `preprocessed:${text}`,
parse: text => ({ text }),
astFormat: "foo-ast"
}
},
printers: {
"foo-ast": {
print: path => path.getValue().text
}
}
};