.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / postcss-html / lib / auto-parser.js
diff --git a/.config/coc/extensions/node_modules/coc-prettier/node_modules/postcss-html/lib/auto-parser.js b/.config/coc/extensions/node_modules/coc-prettier/node_modules/postcss-html/lib/auto-parser.js
new file mode 100644 (file)
index 0000000..725c5c5
--- /dev/null
@@ -0,0 +1,15 @@
+"use strict";
+
+const getSyntax = require("./get-syntax");
+
+function autoParser (source, opts) {
+       const syntax = getSyntax(opts);
+       const document = syntax.parse(source, opts);
+       // document.source.syntax = syntax;
+       Object.defineProperty(document.source, "syntax", {
+               get: () => syntax,
+       });
+       return document;
+}
+
+module.exports = autoParser;