From 34cfff4e4c846df313df2d60e3b54045eba19860 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Thu, 4 Mar 2021 20:37:28 -0500 Subject: [PATCH] Changeset: Delete unused code --- src/static/js/Changeset.js | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/src/static/js/Changeset.js b/src/static/js/Changeset.js index d1fa90f35..72d4eb00b 100644 --- a/src/static/js/Changeset.js +++ b/src/static/js/Changeset.js @@ -159,17 +159,6 @@ exports.newOp = (optOpcode) => ({ attribs: '', }); -/** - * Clones an Op - * @param op Op to be cloned - */ -exports.cloneOp = (op) => ({ - opcode: op.opcode, - chars: op.chars, - lines: op.lines, - attribs: op.attribs, -}); - /** * Copies op1 to op2 * @param op1 src Op @@ -182,17 +171,6 @@ exports.copyOp = (op1, op2) => { op2.attribs = op1.attribs; }; -/** - * Writes the Op in a string the way that changesets need it - */ -exports.opString = (op) => { - // just for debugging - if (!op.opcode) return 'null'; - const assem = exports.opAssembler(); - assem.append(op); - return assem.toString(); -}; - /** * Used to check if a Changeset if valid * @param cs {Changeset} Changeset to be checked @@ -556,8 +534,6 @@ exports.textLinesMutator = (lines) => { lines.splice.apply(lines, s); }; - const lines_toSource = () => lines.toSource(); - /** * Get a line from lines at given index * @param {Number} idx an index @@ -630,10 +606,6 @@ exports.textLinesMutator = (lines) => { */ const isCurLineInSplice = () => (curLine - curSplice[0] < (curSplice.length - 2)); - const debugPrint = (typ) => { /* eslint-disable-line no-unused-vars */ - print(`${typ}: ${curSplice.toSource()} / ${curLine},${curCol} / ${lines_toSource()}`); - }; - /** * Incorporates current line into the splice * and marks its old position to be deleted. @@ -1424,7 +1396,6 @@ exports.makeSplice = (oldFullText, spliceStart, numRemoved, newText, optNewTextA * @param cs Changeset */ exports.toSplices = (cs) => { - // const unpacked = exports.unpack(cs); const splices = [];