MCPcopy Create free account
hub / github.com/breck7/scroll / _getAtomStyle

Method _getAtomStyle

external/.scrollLibs.js:21615–21627  ·  view source on GitHub ↗
(lineIndex, atomIndex)

Source from the content-addressed store, hash-verified

21613 return style
21614 }
21615 _getAtomStyle(lineIndex, atomIndex) {
21616 try {
21617 const program = this._getParsedProgram()
21618 // todo: if the current atom is an error, don't show red?
21619 if (!program.getAtomPaintAtPosition) console.log(program)
21620 const paint = program.getAtomPaintAtPosition(lineIndex, atomIndex)
21621 const style = paint ? textMateScopeToCodeMirrorStyle(paint.split(".")) : undefined
21622 return style || "noPaintDefinedInParsers"
21623 } catch (err) {
21624 console.error(err)
21625 return "noPaintDefinedInParsers"
21626 }
21627 }
21628 // todo: remove.
21629 startState() {
21630 return {

Callers 1

Calls 4

logMethod · 0.80
splitMethod · 0.80

Tested by

no test coverage detected