From 8edf5ba29d3dc1362acba29e838db882216d99d5 Mon Sep 17 00:00:00 2001 From: JoostK Date: Fri, 17 Jul 2020 23:23:29 +0200 Subject: [PATCH] refactor(compiler): remove unused parser methods (#38126) These methods are no longer used so they can safely be removed. PR Close #38126 --- packages/compiler/src/ml_parser/parser.ts | 44 ----------------------- 1 file changed, 44 deletions(-) diff --git a/packages/compiler/src/ml_parser/parser.ts b/packages/compiler/src/ml_parser/parser.ts index fa27315583..003404a06d 100644 --- a/packages/compiler/src/ml_parser/parser.ts +++ b/packages/compiler/src/ml_parser/parser.ts @@ -337,25 +337,6 @@ class _TreeBuilder { return this._elementStack.length > 0 ? this._elementStack[this._elementStack.length - 1] : null; } - /** - * Returns the parent in the DOM and the container. - * - * `` elements are skipped as they are not rendered as DOM element. - */ - private _getParentElementSkippingContainers(): - {parent: html.Element|null, container: html.Element|null} { - let container: html.Element|null = null; - - for (let i = this._elementStack.length - 1; i >= 0; i--) { - if (!isNgContainer(this._elementStack[i].name)) { - return {parent: this._elementStack[i], container}; - } - container = this._elementStack[i]; - } - - return {parent: null, container}; - } - private _addToParent(node: html.Node) { const parent = this._getParentElement(); if (parent != null) { @@ -365,31 +346,6 @@ class _TreeBuilder { } } - /** - * Insert a node between the parent and the container. - * When no container is given, the node is appended as a child of the parent. - * Also updates the element stack accordingly. - * - * @internal - */ - private _insertBeforeContainer( - parent: html.Element, container: html.Element|null, node: html.Element) { - if (!container) { - this._addToParent(node); - this._elementStack.push(node); - } else { - if (parent) { - // replace the container with the new node in the children - const index = parent.children.indexOf(container); - parent.children[index] = node; - } else { - this.rootNodes.push(node); - } - node.children.push(container); - this._elementStack.splice(this._elementStack.indexOf(container), 0, node); - } - } - private _getElementFullName(prefix: string, localName: string, parentElement: html.Element|null): string { if (prefix === '') {