'use strict'; let CodeWriter = require('./CodeWriter'); function fixIndentation(lines) { let length = lines.length; let startLine = 0; let endLine = length; for (; startLinestartLine; endLine--) { let line = lines[endLine-1]; if (line.trim() !== '') { break; } } if (endLine === startLine) { return ''; } if (startLine !== 0 || endLine !== length) { lines = lines.slice(startLine, endLine); } let firstLine = lines[0]; let indentToRemove = /^\s*/.exec(firstLine)[0]; if (indentToRemove) { for (let i=0; i\n' + src + '\n<'); return this.compiler.compile(src, this.context); } get staticCode() { let staticNodes = this.context.getStaticNodes(); if (!staticNodes || staticNodes.length === 0) { return null; } let codeWriter = new CodeWriter(this.context.options, this.builder); codeWriter.write(staticNodes); return codeWriter.getCode(); } } module.exports = InlineCompiler;