Title: bpo-40334: Always show the caret on SyntaxErrors by lysnikolaou · Pull Request #20050 · python/cpython · GitHub
Open Graph Title: bpo-40334: Always show the caret on SyntaxErrors by lysnikolaou · Pull Request #20050 · python/cpython
X Title: bpo-40334: Always show the caret on SyntaxErrors by lysnikolaou · Pull Request #20050 · python/cpython
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. https://bugs.python.org/issue40334
Open Graph 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 _PyPeg...
X 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 _PyPeg...
Opengraph URL: https://github.com/python/cpython/pull/20050
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:126b6ab6-456b-cdc0-24d8-7cd1f66a85e8 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | D408:23CB5E:48C647:670783:696A5023 |
| html-safe-nonce | 3c1be81461619f15b2aead6a50a3331a1874a5ae625f4468851fc0d6cc50ad69 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENDA4OjIzQ0I1RTo0OEM2NDc6NjcwNzgzOjY5NkE1MDIzIiwidmlzaXRvcl9pZCI6IjE2OTUyMTkyODU2NDc1NzcxMjMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 25fb6c5da7c02b8ae8d1007e72dc30f9b1108ce15053c5139e8d4a5b871fd020 |
| hovercard-subject-tag | pull_request:416432748 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python/cpython/pull/20050/files |
| twitter:image | https://avatars.githubusercontent.com/u/20306270?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/20306270?s=400&v=4 |
| og:image:alt | 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 _PyPeg... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3f871c8e07f0ae1886fa8dac284166d28b09ad5bada6476fc10b674e489788ef |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 63c426b30d262aba269ef14c40e3c817b384cd61 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width