3 Matching Annotations
- Nov 2022
-
www.oscarberg.com www.oscarberg.com
-
And with diagrams as text close to the code chances are they will be kept to up to date (and created to begin with…).
-
- Oct 2022
-
www.sumologic.com www.sumologic.com
-
will improve collaboration
The article contains no proof of this statement.
If someone knows of research that proves this, please let me know.
-
- Jul 2022
-
-
// NB: Since line terminators can be the multibyte CRLF sequence, care // must be taken to ensure we work for calls where `tokenPosition` is some // start minus 1, where that "start" is some line start itself.
I think this satisfies the threshold of "minimum viable publication". So write this up and reference it here.
Full impl.:
getLineStart(tokenPosition, anteTerminators = null) { if (tokenPosition > this._edge && tokenPosition != this.length) { throw new Error("random access too far out"); // XXX } // NB: Since line terminators can be the multibyte CRLF sequence, care // must be taken to ensure we work for calls where `tokenPosition` is some // start minus 1, where that "start" is some line start itself. for (let i = this._lineTerminators.length - 1; i >= 0; --i) { let current = this._lineTerminators[i]; if (tokenPosition >= current.position + current.content.length) { if (anteTerminators) { anteTerminators.push(...this._lineTerminators.slice(0, i)); } return current.position + current.content.length; } } return 0; }
(Inlined for posterity, since this comes from an uncommitted working directory.)
-