import {isBlank} from 'angular2/src/facade/lang'; import {List, ListWrapper} from 'angular2/src/facade/collection'; import {CompileElement} from './compile_element'; import {CompileStep} from './compile_step'; /** * Controls the processing order of elements. * Right now it only allows to add a parent element. */ export class CompileControl { _steps:List; _currentStepIndex:number; _parent:CompileElement; _results; _additionalChildren; constructor(steps) { this._steps = steps; this._currentStepIndex = 0; this._parent = null; this._results = null; this._additionalChildren = null; } // only public so that it can be used by compile_pipeline internalProcess(results, startStepIndex, parent:CompileElement, current:CompileElement) { this._results = results; var previousStepIndex = this._currentStepIndex; var previousParent = this._parent; for (var i=startStepIndex; i