Lines Matching refs:tok

1493                     Token tok;
1495 scan(&tok); // read in heredoc identifier
1496 if (tok.value != TOK.identifier)
1498 error("identifier expected for heredoc, not %s", tok.toChars());
1503 hereid = tok.ident;
1540 Token tok;
1543 scan(&tok); // read in possible heredoc identifier
1544 //printf("endid = '%s'\n", tok.ident.toChars());
1545 if (tok.value == TOK.identifier && tok.ident is hereid)
1592 Token tok;
1593 scan(&tok);
1594 switch (tok.value)
1902 * If it's an integer, store it in tok.TKutok.Vlong.
1905 * If it's double, store it in tok.TKutok.Vdouble.
2648 * tok = token we're on, which is linnum of linemarker
2653 final void poundLine(ref Token tok, bool linemarker)
2660 scan(&tok);
2661 if (tok.value == TOK.int32Literal || tok.value == TOK.int64Literal)
2663 const lin = cast(int)(tok.unsvalue);
2664 if (lin != tok.unsvalue)
2666 error(tok.loc, "line number `%lld` out of range", cast(ulong)tok.unsvalue);
2673 else if (tok.value == TOK.line) // #line __LINE__
2678 error(tok.loc, "positive integer argument expected following `#line`");
2679 if (tok.value != TOK.endOfLine)
2685 scan(&tok);
2686 switch (tok.value)
2705 if (tok.ptr[0] != '"' || tok.postfix != 0)
2707 filespec = tok.ustring;
2712 if (linemarker && tok.unsvalue >= 1 && tok.unsvalue <= 4)
2724 error(tok.loc, "invalid filename for `#line` directive");
2726 error(tok.loc, "invalid flag for line marker directive");
2728 error(tok.loc, "found `%s` when expecting new line following `#line` directive", tok.toChars());
2729 if (tok.value != TOK.endOfLine)
3266 TOK tok;
3267 tok = lex1.nextToken();
3268 //printf("tok == %s, %d, %d\n", Token::toChars(tok), tok, TOK.int32);
3269 assert(tok == TOK.int32);
3270 tok = lex1.nextToken();
3271 assert(tok == TOK.endOfFile);
3272 tok = lex1.nextToken();
3273 assert(tok == TOK.endOfFile);
3274 tok = lex1.nextToken();
3275 assert(tok == TOK.endOfFile);
3301 TOK tok = lex2.nextToken();
3303 while ((tok != TOK.endOfFile) && (iterations++ < testcase.length))
3305 tok = lex2.nextToken();
3307 assert(tok == TOK.endOfFile);
3308 tok = lex2.nextToken();
3309 assert(tok == TOK.endOfFile);