Lines Matching defs:line
159 * the only statement on the source code line. */
202 /* Check whether the line contains a coding spec. If it does,
208 check_coding_spec(const char* line, Py_ssize_t size, struct tok_state *tok,
213 /* It's a continuation line, so it can't be a coding spec. */
217 if (!get_coding_spec(line, &cs, size, tok)) {
223 if (line[i] == '#' || line[i] == '\n' || line[i] == '\r')
225 if (line[i] != ' ' && line[i] != '\t' && line[i] != '\014') {
226 /* Stop checking coding spec after a line containing
300 tok_concatenate_interactive_new_line(struct tok_state *tok, const char *line) {
303 if (!line) {
308 Py_ssize_t line_size = strlen(line);
309 char last_char = line[line_size > 0 ? line_size - 1 : line_size];
325 strcpy(new_str + current_size, line);
327 /* Last line does not end in \n, fake one */
337 /* Read a line of text from TOK into S, using the stream in TOK.
341 1) NULL: need to call tok->decoding_readline to get a new line
345 (in the s buffer) to copy entire contents of the line read
386 PyObject *line;
389 line = tok->decoding_buffer;
390 if (line == NULL) {
391 line = PyObject_CallNoArgs(tok->decoding_readline);
392 if (line == NULL) {
400 buf = PyUnicode_AsUTF8AndSize(line, &buflen);
419 Py_DECREF(line);
422 Py_XDECREF(line);
448 * the end of line.*/
560 ensure_utf8(char *line, struct tok_state *tok)
565 for (c = (unsigned char *)line; *c; c += length) {
574 "in file %U on line %i, "
705 /* need to check line 1 and 2 separately since check_coding_spec
706 assumes a single line as input */
841 char *line = _Py_UniversalNewlineFgetsWithSize(tok->inp, n_chars, tok->fp, NULL, &line_size);
842 if (line == NULL) {
846 tok_concatenate_interactive_new_line(tok, line) == -1) {
997 /* Last line does not end in \n, fake one */
1076 fprintf(stderr, "line[%d] = ", tok->lineno);
1466 /* In interactive mode, if the first line contains
1612 /* If this type ignore is the only thing on the line, consume the newline also. */
1976 /* Nodes of type STRING, especially multi line strings
1978 the starting line number and the column offset right.
2019 " (detected at line %d)", start);
2027 " line %d)", start);
2056 goto again; /* Read next line */
2107 "opening parenthesis '%c' on line %d",
2181 encoding in the first or second line of the file (in which case the encoding