Home
last modified time | relevance | path

Searched refs:col_offset (Results 1 – 25 of 39) sorted by relevance

12

/third_party/python/Include/internal/
Dpycore_ast.h327 int col_offset; member
484 int col_offset; member
508 int col_offset; member
528 int col_offset; member
537 int col_offset; member
546 int col_offset; member
609 int col_offset; member
637 col_offset, int end_lineno, int end_col_offset,
642 type_comment, int lineno, int col_offset, int
647 col_offset, int end_lineno, int end_col_offset, PyArena
[all …]
Dpycore_ast_state.h170 PyObject *col_offset; member
/third_party/python/Parser/
Dpegen_errors.c68 Py_ssize_t col_offset = -1; in _Pypegen_tokenizer_error() local
100 col_offset = p->tok->cur - p->tok->buf - 1; in _Pypegen_tokenizer_error()
109 col_offset >= 0 ? col_offset : 0, in _Pypegen_tokenizer_error()
216 Py_ssize_t col_offset; in _PyPegen_raise_error() local
218 if (t->col_offset == -1) { in _PyPegen_raise_error()
220 col_offset = 0; in _PyPegen_raise_error()
223 col_offset = Py_SAFE_DOWNCAST(p->tok->cur - start, intptr_t, int); in _PyPegen_raise_error()
226 col_offset = t->col_offset + 1; in _PyPegen_raise_error()
235 …_PyPegen_raise_error_known_location(p, errtype, t->lineno, col_offset, t->end_lineno, end_col_offs… in _PyPegen_raise_error()
266 Py_ssize_t lineno, Py_ssize_t col_offset, in _PyPegen_raise_error_known_location() argument
[all …]
Dpegen.h37 int lineno, col_offset, end_lineno, end_col_offset; member
145 Py_ssize_t lineno, Py_ssize_t col_offset,
160 Py_ssize_t lineno, Py_ssize_t col_offset, in RAISE_ERROR_KNOWN_LOCATION() argument
166 Py_ssize_t _col_offset = (col_offset == CURRENT_POS ? CURRENT_POS : col_offset + 1); in RAISE_ERROR_KNOWN_LOCATION()
174 #define EXTRA_EXPR(head, tail) head->lineno, (head)->col_offset, (tail)->end_lineno, (tail)->end_co…
179 …RAISE_ERROR_KNOWN_LOCATION(p, PyExc_SyntaxError, (a)->lineno, (a)->col_offset, (b)->end_lineno, (b…
181 …RAISE_ERROR_KNOWN_LOCATION(p, PyExc_SyntaxError, (a)->lineno, (a)->col_offset, (a)->end_lineno, (a…
183 …RAISE_ERROR_KNOWN_LOCATION(p, PyExc_SyntaxError, (a)->lineno, (a)->col_offset, CURRENT_POS, CURREN…
288 int lineno, int col_offset, int end_lineno,
DPython.asdl53 -- col_offset is the byte offset in the utf8 string the parser uses
54 attributes (int lineno, int col_offset, int? end_lineno, int? end_col_offset)
92 -- col_offset is the byte offset in the utf8 string the parser uses
93 attributes (int lineno, int col_offset, int? end_lineno, int? end_col_offset)
109 attributes (int lineno, int col_offset, int? end_lineno, int? end_col_offset)
115 attributes (int lineno, int col_offset, int? end_lineno, int? end_col_offset)
119 attributes (int lineno, int col_offset, int? end_lineno, int? end_col_offset)
123 attributes (int lineno, int col_offset, int? end_lineno, int? end_col_offset)
141 attributes (int lineno, int col_offset, int end_lineno, int end_col_offset)
Dpegen.c38 a->lineno, a->col_offset, a->end_lineno, a->end_col_offset, in _PyPegen_add_type_comment_to_arg()
157 byte_offset_to_character_offset(PyObject *line, Py_ssize_t col_offset) in byte_offset_to_character_offset() argument
164 if (col_offset > len + 1) { in byte_offset_to_character_offset()
165 col_offset = len + 1; in byte_offset_to_character_offset()
167 assert(col_offset >= 0); in byte_offset_to_character_offset()
168 PyObject *text = PyUnicode_DecodeUTF8(str, col_offset, "replace"); in byte_offset_to_character_offset()
345 Py_ssize_t col_offset = -1; in tokenizer_error() local
377 col_offset = p->tok->cur - p->tok->buf - 1; in tokenizer_error()
386 col_offset >= 0 ? col_offset : 0, in tokenizer_error()
403 Py_ssize_t col_offset; in _PyPegen_raise_error() local
[all …]
Dstring_parser.c403 p2->starting_col_offset = t->col_offset + cols; in fstring_compile_expr()
797 first_token->col_offset, in fstring_find_expr()
1043 return _PyAST_Constant(s, kind, first_token->lineno, first_token->col_offset, in make_str_node_and_del()
1204 return _PyAST_JoinedStr(seq, first_token->lineno, first_token->col_offset, in _PyPegen_FstringParser_Finish()
Dtokenizer.c1077 int col_offset, int end_col_offset, in _syntaxerror_range() argument
1092 if (col_offset == -1) { in _syntaxerror_range()
1093 col_offset = (int)PyUnicode_GET_LENGTH(errtext); in _syntaxerror_range()
1096 end_col_offset = col_offset; in _syntaxerror_range()
1110 col_offset, errtext, tok->lineno, end_col_offset); in _syntaxerror_range()
1138 int col_offset, int end_col_offset, in syntaxerror_known_range() argument
1147 int ret = _syntaxerror_range(tok, format, col_offset, end_col_offset, vargs); in syntaxerror_known_range()
Dparser.c1557 int _start_col_offset = p->tokens[_mark]->col_offset; in statement_newline_rule()
1786 int _start_col_offset = p->tokens[_mark]->col_offset; in simple_stmt_rule()
2334 int _start_col_offset = p->tokens[_mark]->col_offset; in assignment_rule()
2898 int _start_col_offset = p->tokens[_mark]->col_offset; in global_stmt_rule()
2963 int _start_col_offset = p->tokens[_mark]->col_offset; in nonlocal_stmt_rule()
3028 int _start_col_offset = p->tokens[_mark]->col_offset; in yield_stmt_rule()
3090 int _start_col_offset = p->tokens[_mark]->col_offset; in assert_stmt_rule()
3158 int _start_col_offset = p->tokens[_mark]->col_offset; in del_stmt_rule()
3302 int _start_col_offset = p->tokens[_mark]->col_offset; in import_name_rule()
3369 int _start_col_offset = p->tokens[_mark]->col_offset; in import_from_rule()
[all …]
/third_party/python/Python/
DPython-ast.c184 Py_CLEAR(state->col_offset); in _PyAST_Fini()
291 if ((state->col_offset = PyUnicode_InternFromString("col_offset")) == NULL) return 0; in init_identifiers()
1946 type_comment, int lineno, int col_offset, int end_lineno, in _PyAST_FunctionDef() argument
1971 p->col_offset = col_offset; in _PyAST_FunctionDef()
1980 string type_comment, int lineno, int col_offset, int in _PyAST_AsyncFunctionDef() argument
2005 p->col_offset = col_offset; in _PyAST_AsyncFunctionDef()
2014 int lineno, int col_offset, int end_lineno, int end_col_offset, in _PyAST_ClassDef() argument
2033 p->col_offset = col_offset; in _PyAST_ClassDef()
2040 _PyAST_Return(expr_ty value, int lineno, int col_offset, int end_lineno, int in _PyAST_Return() argument
2050 p->col_offset = col_offset; in _PyAST_Return()
[all …]
Dsymtable.c53 (x)->lineno, (x)->col_offset, (x)->end_lineno, (x)->end_col_offset
60 void *key, int lineno, int col_offset, in ste_new() argument
94 ste->ste_col_offset = col_offset; in ste_new()
207 int lineno, int col_offset,
980 void *ast, int lineno, int col_offset, in symtable_enter_block() argument
985 ste = ste_new(st, name, block, ast, lineno, col_offset, end_lineno, end_col_offset); in symtable_enter_block()
1035 int lineno, int col_offset, int end_lineno, int end_col_offset) in symtable_add_def_helper() argument
1052 lineno, col_offset + 1, in symtable_add_def_helper()
1074 lineno, col_offset + 1, in symtable_add_def_helper()
1121 int lineno, int col_offset, int end_lineno, int end_col_offset) in symtable_add_def() argument
[all …]
Dfuture.c44 PyErr_SyntaxLocationObject(filename, s->lineno, s->col_offset + 1); in future_check_features()
49 PyErr_SyntaxLocationObject(filename, s->lineno, s->col_offset + 1); in future_check_features()
99 PyErr_SyntaxLocationObject(filename, s->lineno, s->col_offset); in future_parse()
Derrors.c1575 PyErr_SyntaxLocationObjectEx(PyObject *filename, int lineno, int col_offset, in PyErr_SyntaxLocationObjectEx() argument
1604 if (col_offset >= 0) { in PyErr_SyntaxLocationObjectEx()
1605 tmp = PyLong_FromLong(col_offset); in PyErr_SyntaxLocationObjectEx()
1692 PyErr_SyntaxLocationObject(PyObject *filename, int lineno, int col_offset) { in PyErr_SyntaxLocationObject() argument
1693 PyErr_SyntaxLocationObjectEx(filename, lineno, col_offset, lineno, -1); in PyErr_SyntaxLocationObject()
1697 PyErr_RangedSyntaxLocationObject(PyObject *filename, int lineno, int col_offset, in PyErr_RangedSyntaxLocationObject() argument
1699 PyErr_SyntaxLocationObjectEx(filename, lineno, col_offset, end_lineno, end_col_offset); in PyErr_RangedSyntaxLocationObject()
1703 PyErr_SyntaxLocationEx(const char *filename, int lineno, int col_offset) in PyErr_SyntaxLocationEx() argument
1716 PyErr_SyntaxLocationObject(fileobj, lineno, col_offset); in PyErr_SyntaxLocationEx()
/third_party/python/Lib/test/
Dtest_fstring.py113 self.assertEqual(binop.col_offset, 3)
114 self.assertEqual(binop.left.col_offset, 3)
115 self.assertEqual(binop.right.col_offset, 7)
153 self.assertEqual(binop1.col_offset, 8)
154 self.assertEqual(binop1.left.col_offset, 8)
155 self.assertEqual(binop1.right.col_offset, 12)
165 self.assertEqual(binop2.col_offset, 23)
166 self.assertEqual(binop2.left.col_offset, 23)
167 self.assertEqual(binop2.right.col_offset, 27)
196 self.assertEqual(binop.col_offset, 3)
[all …]
Dtest_ast.py21 result.append((t.lineno, t.col_offset))
263 node_pos = (ast_node.lineno, ast_node.col_offset)
265 parent_pos = (ast_node.lineno, ast_node.col_offset)
271 first_pos = (value[0].lineno, value[0].col_offset)
346 self.assertEqual(alias.col_offset, 16)
355 self.assertEqual(alias.col_offset, 16)
604 pos = dict(lineno=2, col_offset=3)
649 self.assertEqual(parent_binop.col_offset, 0)
651 self.assertEqual(child_binop.col_offset, 0)
653 self.assertEqual(grandchild_binop.col_offset, 0)
[all …]
/third_party/python/Include/cpython/
Dpyerrors.h151 int col_offset);
156 int col_offset,
/third_party/ffmpeg/libavformat/
Daaxdec.c236 int64_t col_offset; in aax_read_header() local
244 col_offset = a->xcolumns[c].offset; in aax_read_header()
248 data_offset = a->schema_offset + col_offset; in aax_read_header()
250 data_offset = a->rows_offset + r * a->row_width + col_offset; in aax_read_header()
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/int8/
Dmatmul_int8.c107 size_t col_offset = (size_t)col; in RowMajor2Row16x4MajorInt8() local
126 : [ dst_c ] "r"(dst_c), [ src_c ] "r"(src_c), [ col_offset ] "r"(col_offset) in RowMajor2Row16x4MajorInt8()
146 : [ dst_c ] "r"(dst_c), [ src_c ] "r"(src_c), [ col_offset ] "r"(col_offset) in RowMajor2Row16x4MajorInt8()
149 MatrixPack4x16UnitInt8(src_c, dst_c, C4NUM, C16NUM, col_offset); in RowMajor2Row16x4MajorInt8()
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/gpu/cuda_impl/
Dextract_image_patches_impl.cu43 const int64_t col_offset = patch_offset - row_offset * row_stride; in ExtractImagePatches() local
44 const int64_t input_col = col_index * stride_col + col_offset * rate_col - col_padding_left; in ExtractImagePatches()
/third_party/python/Lib/
Dast.py203 def _fix(node, lineno, col_offset, end_lineno, end_col_offset): argument
216 node.col_offset = col_offset
218 col_offset = node.col_offset
225 _fix(child, lineno, col_offset, end_lineno, end_col_offset)
349 col_offset = node.col_offset
356 return lines[lineno].encode()[col_offset:end_col_offset].decode()
359 padding = _pad_whitespace(lines[lineno].encode()[:col_offset].decode())
363 first = padding + lines[lineno].encode()[col_offset:].decode()
Dpyclbr.py234 if node.col_offset != 0:
249 if node.col_offset != 0:
Dtokenize.py181 col_offset = col - self.prev_col
182 if col_offset:
183 self.tokens.append(" " * col_offset)
/third_party/mindspore/mindspore/_extends/parse/
Dparser.py548 self.col_offset = 0
566 self.col_offset = \
738 start_colno += self.col_offset
740 end_colno += self.col_offset
/third_party/python/Lib/lib2to3/pgen2/
Dtokenize.py181 col_offset = col - self.prev_col
182 if col_offset:
183 self.tokens.append(" " * col_offset)
/third_party/python/Doc/library/
Dast.rst78 col_offset
83 :attr:`lineno`, :attr:`col_offset`, :attr:`end_lineno`, and
86 first line is line 1) and the :attr:`col_offset` and :attr:`end_col_offset`
94 ``source_line[node.col_offset : node.end_col_offset]``.
111 node.operand.col_offset = 0
113 node.col_offset = 0
117 node = ast.UnaryOp(ast.USub(), ast.Constant(5, lineno=0, col_offset=0),
118 lineno=0, col_offset=0)
2007 :attr:`col_offset`, or :attr:`end_col_offset`) is missing, return ``None``.
2018 :attr:`lineno` and :attr:`col_offset` attributes for every node that supports
[all …]

12