}
else if (node1.listHeight > node2.listHeight) {
return append(node1 as ListAstNode, node2);
} else {
return prepend(node2 as ListAstNode, node1);
Frontier kind: Joint frontier
unlabeled · c_c730d86bd5c5
1 test · 6486 LOC · 36 files · introduces 1 test · 48 LOC · 2 files
The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.
Introduced files, introduced tests, and structurally relevant concept specialization
In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.
Graph controls are ready.
Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.
Every exact file and test below is linked only from the concept that introduces it.
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/charCode.test|title=CharCode has good values|occurrence=1mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/path.test|title=Paths (Node Implementation) path|occurrence=1mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/uri.test|title=URI File paths containing apostrophes break URI parsing and cannot be opened #276075|occurrence=1mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/uri.test|title=URI URI#file, win-speciale|occurrence=1Every collected test enters the hierarchy at exactly one concept.
1 test introduced at this concept.
Every collected source range enters the hierarchy at exactly one concept.
2 files ranked by introduced lines: 48 introduced LOC across 10 ranges. Expand a file to inspect source; the > gutter marks introduced lines.
}
else if (node1.listHeight > node2.listHeight) {
return append(node1 as ListAstNode, node2);
} else {
return prepend(node2 as ListAstNode, node1);
* Returns the new root.
*/
list = list.toMutable();
let curNode: AstNode = list;
const parents: ListAstNode[] = [];
let nodeToAppendOfCorrectHeight: AstNode | undefined;
while (true) {
// assert nodeToInsert.listHeight <= curNode.listHeight
if (nodeToAppend.listHeight === curNode.listHeight) {
nodeToAppendOfCorrectHeight = nodeToAppend;
break;
}
// assert 0 <= nodeToInsert.listHeight < curNode.listHeight
if (curNode.kind !== AstNodeKind.List) {
throw new Error('unexpected');
}
// assert 2 <= curNode.childrenLength <= 3
curNode = curNode.makeLastElementMutable()!;
}
// assert nodeToAppendOfCorrectHeight!.listHeight === curNode.listHeight
for (let i = parents.length - 1; i >= 0; i--) {
const parent = parents[i];
if (nodeToAppendOfCorrectHeight) {
// Can we take the element?
if (parent.childrenLength >= 3) {
// assert parent.childrenLength === 3 && parent.listHeight === nodeToAppendOfCorrectHeight.listHeight + 1
// Send the third element + the new element to the parent.
nodeToAppendOfCorrectHeight = ListAstNode.create23(parent.unappendChild()!, nodeToAppendOfCorrectHeight, null, false);
parent.appendChildOfSameHeight(nodeToAppendOfCorrectHeight);
nodeToAppendOfCorrectHeight = undefined;
}
} else {
parent.handleChildrenChanged();
}
if (nodeToAppendOfCorrectHeight) {
return ListAstNode.create23(list, nodeToAppendOfCorrectHeight, null, false);
return list;
}
}
/**
public makeLastElementMutable(): AstNode | undefined {
const childCount = this.childrenLength;
if (childCount === 0) {
return undefined;
}
const mutable = lastChild.kind === AstNodeKind.List ? lastChild.toMutable() : lastChild;
if (lastChild !== mutable) {
this.setChild(childCount - 1, mutable);
}
}
public makeFirstElementMutable(): AstNode | undefined {
public appendChildOfSameHeight(node: AstNode): void {
this._children.push(node);
this.handleChildrenChanged();
}
public unappendChild(): AstNode | undefined {