MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / PiuCodeParserColorAt

Function PiuCodeParserColorAt

modules/piu/PC/Code/piuCodeColor.c:74–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72}
73
74void PiuCodeParserColorAt(PiuCodeParser parser, int32_t color, int32_t offset)
75{
76 PiuCodeRunRecord runRecord;
77 if (parser->color != color) {
78 if (offset > parser->output) {
79 runRecord.kind = piuCodeColorKind;
80 runRecord.color = parser->color;
81 runRecord.count = offset - parser->output;
82 PiuTextBufferAppend(parser->the, parser->runs, &runRecord, sizeof(PiuCodeRunRecord));
83 parser->string = fxToString(parser->the, parser->slot);
84 parser->output = offset;
85 }
86 parser->color = color;
87 }
88}
89
90void PiuCodeParserEnd(PiuCode* self, PiuCodeParser parser)
91{

Callers 12

fxParseJSCodeFunction · 0.85
fxParseJSStringFunction · 0.85
fxParseJSONObjectFunction · 0.85
fxParseJSONValueFunction · 0.85
PiuCodeParserEndFunction · 0.85
PiuCodeFormatXMLFunction · 0.85
fxParseXMLCommentFunction · 0.85
fxParseXMLDataFunction · 0.85
fxParseXMLStartTagFunction · 0.85
fxParseXMLStopTagFunction · 0.85
fxParseXMLValueFunction · 0.85

Calls 2

PiuTextBufferAppendFunction · 0.85
fxToStringFunction · 0.85

Tested by

no test coverage detected