export const parseFile = filename => {
	const lines = splitLines(readFile(filename))
	const tree = parseLines(lines)
	return ['document', [filename, 1, 1], lines, undefined, tree]
}

import {readFileSync} from 'fs'
const readFile = filename => readFileSync(filename).toString()

const splitLines = s => s.split(/\r?\n|[\u2028\u2029]/)

import memoize from '../util/memoize'
import {Parser} from './parser'
const match = Parser.match::memoize()
export const parseLines = lines => Parser::match(lines, 'block')

@@ -32,16 +32,51 @@
 me =%3E %7B%0A
+%09console.time('parse ' + filename)%0A
 %09const l
@@ -145,16 +145,54 @@
 (lines)%0A
+%09console.timeEnd('parse ' + filename)%0A
 %09return 

add parse time