3 var xtend = require('xtend');
4 var removePosition = require('unist-util-remove-position');
6 module.exports = parse;
9 var EXPRESSION_LINE_BREAKS = /\r\n|\r/g;
11 /* Parse the bound file. */
14 var value = String(self.file);
15 var start = {line: 1, column: 1, offset: 0};
16 var content = xtend(start);
19 /* Clean non-unix newlines: `\r\n` and `\r` are all
20 * changed to `\n`. This should not affect positional
22 value = value.replace(EXPRESSION_LINE_BREAKS, C_NEWLINE);
24 if (value.charCodeAt(0) === 0xFEFF) {
25 value = value.slice(1);
33 children: self.tokenizeBlock(value, content),
36 end: self.eof || xtend(start)
40 if (!self.options.position) {
41 removePosition(node, true);