| 72 | } |
| 73 | |
| 74 | void 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 | |
| 90 | void PiuCodeParserEnd(PiuCode* self, PiuCodeParser parser) |
| 91 | { |
no test coverage detected