Lines Matching refs:tokc
85 JSToken tokc; variable
111 if (!strcmp(tokc.str, define_tab[i])) in define_symbol()
123 if (!strcmp(tokc.str, define_tab[i])) { in undefine_symbol()
136 if (!strcmp(tokc.str, define_tab[i])) in find_symbol()
155 if (tokc.tok != ' ' && tokc.tok != '\t' && in skip_blanks()
156 tokc.tok != TOK_COM && tokc.tok != TOK_LCOM) in skip_blanks()
157 return tokc.tok; in skip_blanks()
173 if (!strcmp(tokc.str, "define")) { in parse_directive()
176 define_symbol(tokc.str); in parse_directive()
177 } else if (!strcmp(tokc.str, "undef")) { in parse_directive()
180 undefine_symbol(tokc.str); in parse_directive()
181 } else if ((ifdef = 1, !strcmp(tokc.str, "ifdef")) || in parse_directive()
182 (ifdef = 0, !strcmp(tokc.str, "ifndef"))) { in parse_directive()
186 if (find_symbol(tokc.str)) in parse_directive()
188 } else if (!strcmp(tokc.str, "else")) { in parse_directive()
192 } else if (!strcmp(tokc.str, "endif")) { in parse_directive()
220 tok_reset(&tokc); in next()
221 tokc.line_num = line_num; in next()
222 tokc.lines = 0; in next()
225 tokc.tok = TOK_EOF; in next()
233 tok_add_ch(&tokc, ch); in next()
239 tok_add_ch(&tokc, ch); in next()
242 tok_add_ch(&tokc, '\0'); in next()
243 tokc.tok = TOK_IDENT; in next()
248 tok_add_ch(&tokc, '.'); in next()
251 tokc.tok = '.'; in next()
254 tok_add_ch(&tokc, ch); in next()
258 tok_add_ch(&tokc, ch); in next()
263 tok_add_ch(&tokc, ch); in next()
266 tok_add_ch(&tokc, '\0'); in next()
267 tokc.tok = TOK_NUM; in next()
273 tok_add_ch(&tokc, ch); in next()
278 tok_add_ch(&tokc, ch); in next()
282 tok_add_ch(&tokc, ch); in next()
286 tok_add_ch(&tokc, ch); in next()
291 tok_add_ch(&tokc, ch); in next()
294 tok_add_ch(&tokc, ch); in next()
298 tok_add_ch(&tokc, ch); in next()
302 tok_add_ch(&tokc, '\0'); in next()
303 tokc.tok = TOK_NUM; in next()
310 tok_add_ch(&tokc, ch); in next()
315 tok_add_ch(&tokc, ch); in next()
317 tok_add_ch(&tokc, ch); in next()
322 tok_add_ch(&tokc, 0); in next()
323 tokc.tok = TOK_STR3; in next()
338 tok_add_ch(&tokc, '\n'); in next()
342 tok_add_ch(&tokc, '\r'); in next()
346 tok_add_ch(&tokc, '\t'); in next()
350 tok_add_ch(&tokc, '\v'); in next()
356 tok_add_ch(&tokc, ch); in next()
365 tok_add_ch(&tokc, n); in next()
384 tok_add_ch(&tokc, n); in next()
392 tok_add_ch(&tokc, ch); in next()
397 tok_add_ch(&tokc, 0); in next()
399 tokc.tok = TOK_STR1; in next()
401 tokc.tok = TOK_STR2; in next()
407 tok_add_ch(&tokc, '/'); in next()
408 tok_add_ch(&tokc, ch); in next()
411 tok_add_ch(&tokc, ch); in next()
414 tok_add_ch(&tokc, '\0'); in next()
415 tokc.tok = TOK_LCOM; in next()
418 tok_add_ch(&tokc, '/'); in next()
419 tok_add_ch(&tokc, ch); in next()
426 tokc.lines++; in next()
427 tok_add_ch(&tokc, ch); in next()
433 tok_add_ch(&tokc, '\0'); in next()
434 tokc.tok = TOK_COM; in next()
436 tokc.tok = '/'; in next()
444 tokc.line_num--; in next()
445 tokc.lines++; in next()
448 tokc.tok = ch; in next()
535 if (tokc.tok >= 256) in print_tok()
587 while (tokc.tok == ' ' || in js_compress()
588 tokc.tok == '\n' || in js_compress()
589 tokc.tok == '\t' || in js_compress()
590 tokc.tok == '\v' || in js_compress()
591 tokc.tok == '\b' || in js_compress()
592 tokc.tok == '\f') { in js_compress()
596 if (tokc.tok == TOK_COM) { in js_compress()
597 print_tok(outfile, &tokc); in js_compress()
599 ltok = tokc.tok; in js_compress()
606 if (tokc.tok == TOK_EOF) in js_compress()
608 if (tokc.tok == ' ' || in js_compress()
609 tokc.tok == '\r' || in js_compress()
610 tokc.tok == '\t' || in js_compress()
611 tokc.tok == '\v' || in js_compress()
612 tokc.tok == '\b' || in js_compress()
613 tokc.tok == '\f' || in js_compress()
614 tokc.tok == TOK_LCOM || in js_compress()
615 tokc.tok == TOK_COM) { in js_compress()
618 } else if (tokc.tok == TOK_STR3) { in js_compress()
619 print_tok(outfile, &tokc); in js_compress()
620 ltok = tokc.tok; in js_compress()
622 } else if (tokc.tok == TOK_STR1 || tokc.tok == TOK_STR2) { in js_compress()
626 for(i = 0; i < tokc.len; i++) { in js_compress()
627 if (tokc.str[i] == '\'') in js_compress()
629 else if (tokc.str[i] == '\"') in js_compress()
633 tokc.tok = TOK_STR2; in js_compress()
635 tokc.tok = TOK_STR1; in js_compress()
636 print_tok(outfile, &tokc); in js_compress()
637 ltok = tokc.tok; in js_compress()
640 if (seen_space && !compat_token(ltok, tokc.tok)) { in js_compress()
643 print_tok(outfile, &tokc); in js_compress()
644 ltok = tokc.tok; in js_compress()
651 while (tokc.tok != TOK_EOF) { in js_compress()
652 print_tok(outfile, &tokc); in js_compress()