clean up babel-generator - closes #2210

This commit is contained in:
Sebastian McKenzie
2015-10-05 16:37:37 +01:00
parent 63cfb82ca7
commit f88cc9d509
268 changed files with 3061 additions and 682 deletions

View File

@@ -23,6 +23,19 @@ export default class Buffer {
_indent: number;
format: Object;
/**
* Description
*/
catchUp(node) {
// catch up to this nodes newline if we're behind
if (node.loc && this.format.retainLines && this.buf) {
while (this.position.line < node.loc.start.line) {
this._push("\n");
}
}
}
/**
* Get the current trimmed buffer.
*/