|
Meta tags:
description=This PR fixes SyntaxError locations, when the caret is not displayed,
by doing the following:
col_number always gets set to the location of the offending
node/expr.
Introduce a new function _PyPegen_raise_error_known_location,
which can be called, when an arbitrary lineno/col_offset
needs to be passed. This function then gets used in the grammar
(through some new macros and inline functions) so that SyntaxError
locations of the new parser match that of the old.
Closes we-like-parsers#126.
htt????/bugs.python.org/issue40334;
Headings (most frequently used words):
uh, oh, navigation, bpo, 40334, always, show, the, caret, on, syntaxerrors, 20050, footer, diff, view, menu, repository, there, are, no, files, selected, for, viewing, filter, by, extension,
Text of the page (most frequently used words):
file (20), cannot (18), for (18), expression (18), check (17), github (16), and (15), the (14), this (13), applied (11), raise_syntax_error (11), show (10), raise_syntax_error_known_location (10), you (9), can (9), line (9), all (9), reload (9), support (9), pegen (9), not (8), that (7), suggestion (7), suggestions (7), while (7), code (7), single (7), loading (7), def (7), target (7), sign (7), from (6), only (6), changes (6), there (6), self (6), diff (6), hidden (6), characters (6), unicode (6), may (6), _pypegen_get_expr_name (6), for_if_clauses (6), python (6), caret (6), security (5), please (5), comments (5), error (5), open (5), tuple (5), annotated (5), with (5), args (5), lysnikolaou (5), always (5), commits (5), your (5), pull (4), was (4), page (4), expand (4), use_old_parser (4), else (4), foo (4), number (4), bidirectional (4), learn (4), about (4), delete (4), view (4), argument (4), unpacking (4), list (4), assignment (4), gram (4), files (4), parser (4), nbsp (4), 2020 (4), bpo (4), 40334 (4), copilot (4), community (3), navigation (3), request (3), must (3), change (3), add (3), batch (3), commit (3), retry (3), pass (3), range (3), __future__ (3), import (3), what (3), review (3), more (3), lib (3), test (3), test_exceptions (3), iterable (3), grammar (3), hide (3), whitespace (3), filter (3), 20050 (3), syntaxerrors (3), merged (3), account (3), quality (3), another (3), tab (3), window (3), refresh (3), session (3), developers (3), changelog (3), customer (3), enterprise (3), grade (3), features (3), build (3), contact (2), status (2), privacy (2), terms (2), footer (2), one (2), viewing (2), invalid (2), toggle (2), 100 (2), int (2), yield (2), 242 (2), original (2), contains (2), text (2), interpreted (2), compiled (2), differently (2), than (2), appears (2), below (2), editor (2), reveals (2), desktop (2), edit (2), additions (2), deletions (2), have (2), default (2), follows (2), param_no_default (2), used (2), comprehension (2), assign (2), illegal (2), annotation (2), annotated_rhs (2), use (2), expressions (2), contain (2), perhaps (2), meant (2), generator (2), parenthesized (2), are (2), 623 (2), selected (2), parse (2), apply (2), split (2), unified (2), failed (2), load (2), jump (2), extension (2), fix (2), displayed (2), syntaxerror (2), select (2), tree (2), issue (2), insights (2), projects (2), actions (2), repository (2), cpython (2), signed (2), universe (2), training (2), integrations (2), stories (2), center (2), documentation (2), business (2), fixes (2), products (2), secret (2), perform, action, time, share, personal, information, manage, cookies, docs, 2026, inc, right, now, back, later, queued, merge, multi, pending, reviews, has, been, marked, resolved, outdated, existing, order, create, valid, applying, deleted, lines, supported, per, subset, closed, because, were, made, annotations, notes, oops, something, went, wrong, down, testsettingexception, cpython_only, testsyntaxerroroffsetcustom, skip_if_new_parser, column, offsets, might, different, nfrom, division, braces, doesnt_exist, baz, star_expression, del_target_end, invalid_del_target, two, type, 655, 660, invalid_double_type_comments, non, slash_with_default, param_with_default, invalid_parameters, starred_expression, invalid_comprehension, newline, indent, raise_indentation_error, expected, indented, block, invalid_block, raise_syntax_error_no_col_offset, augassign, yield_expr, star_expressions, star_named_expression, star_named_expressions, invalid_assignment, invalid_named_expression, invalid_kwarg, _pypegen_arguments_parsing_error, keyword, incorrect_arguments, here, rules, syntax, specialised, messages, t_atom, expr_ty, conversations, clear, filters, viewed, types, address, feedback, display, 929175f, test_cmd_line_script, input, 60b761a, locations, when, 5bbd43e, hold, shift, click, changed, checks, conversation, into, col, offset, master, pablogsal, already, clicking, agree, our, occasionally, send, related, emails, statement, service, free, its, maintainers, question, project, new, items, requests, issues, message, dismiss, alert, switched, accounts, out, appearance, settings, search, pricing, event, talks, workshops, next, partners, company, forum, events, webinars, blog, resource, connect, resources, premium, advanced, ons, trust, why, evaluate, see, industries, government, manufacturing, financial, services, healthcare, industry, nonprofits, startups, team, enterprises, stage, businesses, source, latest, improvements, across, place, developer, articles, sponsors, trending, repos, explore, customize, certifications, scanning, leak, prevention, protection, vulnerability, detection, remediation, secure, cloud, development, environments, codespaces, analysis, enforcement, automation, ship, coding, agent, tasks, automated, work, hosting, collaboration, platform, menu, skip, content,
|