Lines Matching refs:tok

51        int error_lineno = p->tok->parenlinenostack[p->tok->level-1];
52 int error_col = p->tok->parencolstack[p->tok->level-1];
56 p->tok->parenstack[p->tok->level-1]);
69 switch (p->tok->done) {
74 if (p->tok->level) {
100 col_offset = p->tok->cur - p->tok->buf - 1;
108 RAISE_ERROR_KNOWN_LOCATION(p, errtype, p->tok->lineno,
110 p->tok->lineno, -1, msg);
156 if (p->tok->prompt != NULL) {
171 switch (_PyTokenizer_Get(p->tok, &start, &end)) {
177 if (p->tok->level != 0) {
178 int error_lineno = p->tok->parenlinenostack[p->tok->level-1];
223 if (p->tok->cur == p->tok->buf) {
226 const char* start = p->tok->buf ? p->tok->line_start : p->tok->buf;
227 col_offset = Py_SAFE_DOWNCAST(p->tok->cur - start, intptr_t, int);
249 * (multi-line) statement are stored in p->tok->interactive_src_start.
251 * is stored in p->tok->str. */
252 assert((p->tok->fp == NULL && p->tok->str != NULL) || p->tok->fp == stdin);
254 char *cur_line = p->tok->fp_interactive ? p->tok->interactive_src_start : p->tok->str;
256 assert(p->tok->fp_interactive);
263 const char* buf_end = p->tok->fp_interactive ? p->tok->interactive_src_end : p->tok->inp;
297 end_lineno = p->tok->lineno;
300 end_col_offset = p->tok->cur - p->tok->line_start;
323 if (p->tok->fp_interactive && p->tok->interactive_src_start != NULL) {
327 error_line = _PyErr_ProgramDecodedTextObject(p->tok->filename,
328 (int) lineno, p->tok->encoding);
339 assert(p->tok->fp == NULL || p->tok->fp == stdin || p->tok->done == E_EOF);
341 if (p->tok->lineno <= lineno && p->tok->inp > p->tok->buf) {
342 Py_ssize_t size = p->tok->inp - p->tok->buf;
343 error_line = PyUnicode_DecodeUTF8(p->tok->buf, size, "replace");
345 else if (p->tok->fp == NULL || p->tok->fp == stdin) {
364 if (p->tok->encoding != NULL) {
378 tmp = Py_BuildValue("(OnnNnn)", p->tok->filename, lineno, col_number, error_line, end_lineno, end_col_number);
411 int is_tok_ok = (p->tok->done == E_DONE || p->tok->done == E_OK);
423 if (last_token->type == ERRORTOKEN && p->tok->done == E_EOF) {
424 if (p->tok->level) {