Remove unused Position#unshift
Not only is it unused, it'll break things if you push a newline since it doesn't set a new `#column` value.
This commit is contained in:
parent
193b9b5797
commit
9cdb24157e
@ -25,18 +25,4 @@ export default class Position {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unshift a string from the current position, mantaining the current line and column.
|
||||
*/
|
||||
|
||||
unshift(str: string): void {
|
||||
for (let i = 0; i < str.length; i++) {
|
||||
if (str[i] === "\n") {
|
||||
this.line--;
|
||||
} else {
|
||||
this.column--;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user