2020-11-18 05:58:46 -05:00
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
|
languages: [
|
|
|
|
|
{
|
|
|
|
|
name: "foo",
|
|
|
|
|
parsers: ["foo-parser"],
|
2022-07-20 23:18:24 +08:00
|
|
|
extensions: [".foo"],
|
|
|
|
|
},
|
2020-11-18 05:58:46 -05:00
|
|
|
],
|
|
|
|
|
parsers: {
|
|
|
|
|
"foo-parser": {
|
2022-07-20 23:18:24 +08:00
|
|
|
parse: (text) => ({ text }),
|
|
|
|
|
astFormat: "foo-ast",
|
|
|
|
|
},
|
2020-11-18 05:58:46 -05:00
|
|
|
},
|
|
|
|
|
printers: {
|
|
|
|
|
"foo-ast": {
|
2022-07-20 23:18:24 +08:00
|
|
|
print(path) {
|
|
|
|
|
// TODO[@fisker]: Use `lineSuffix` after we support ESM plugin
|
|
|
|
|
return { type: "line-suffix", contents: path.getValue().text.trim() };
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
2020-11-18 05:58:46 -05:00
|
|
|
};
|