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

Function PiuCodeParserEnd

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

Source from the content-addressed store, hash-verified

88}
89
90void PiuCodeParserEnd(PiuCode* self, PiuCodeParser parser)
91{
92 PiuCodeParserColorAt(parser, 0, parser->input);
93 while (parser->character) {
94 switch (parser->character) {
95 case 9:
96 PiuCodeParserTab(parser);
97 break;
98 case 10:
99 case 13:
100 PiuCodeParserReturn(parser);
101 break;
102 default:
103 PiuCodeParserAdvance(parser);
104 break;
105 }
106 }
107 PiuCodeParserFill(parser);
108 if (parser->columnCount < parser->columnIndex)
109 parser->columnCount = parser->columnIndex;
110 (*self)->columnCount = parser->columnCount;
111 (*self)->lineCount = parser->lineCount;
112 /*{
113 PiuCodeRun run;
114 char* string = self->string;
115 FskGrowableArrayGetPointerToItem(self->runs, 0, (void **)&run);
116 fprintf(stderr, "### %ld %ld\n", parser->lineCount, parser->columnCount);
117 while (*string) {
118 if (run->kind == piuCodeLineKind)
119 fprintf(stderr, "\n#");
120 else if (run->kind == piuCodeTabKind)
121 fprintf(stderr, "<%d>", run->color);
122 else {
123 char c = string[run->count];
124 string[run->count] = 0;
125 fprintf(stderr, "(%d)%s", run->color, string);
126 string[run->count] = c;
127 }
128 string += run->count;
129 run++;
130 }
131 fprintf(stderr, "\n");
132 }*/
133}
134
135void PiuCodeParserError(PiuCodeParser parser)
136{

Callers 2

PiuCodeFormatFunction · 0.85
piuCode.cFile · 0.85

Calls 5

PiuCodeParserColorAtFunction · 0.85
PiuCodeParserTabFunction · 0.85
PiuCodeParserReturnFunction · 0.85
PiuCodeParserAdvanceFunction · 0.85
PiuCodeParserFillFunction · 0.85

Tested by

no test coverage detected