27 lines
445 B
JavaScript
27 lines
445 B
JavaScript
"use strict";
|
|
|
|
module.exports = {
|
|
languages: [
|
|
{
|
|
name: "foo",
|
|
parsers: ["foo-parser"],
|
|
extensions: [".foo"]
|
|
}
|
|
],
|
|
defaultOptions: {
|
|
tabWidth: 8
|
|
},
|
|
parsers: {
|
|
"foo-parser": {
|
|
parse: text => ({ text }),
|
|
astFormat: "foo-ast"
|
|
}
|
|
},
|
|
printers: {
|
|
"foo-ast": {
|
|
print: (path, options) =>
|
|
options.tabWidth ? `tabWidth:${options.tabWidth}` : path.getValue().text
|
|
}
|
|
}
|
|
};
|