GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Include column offset information in the tokenizer · Issue #97997 · python/cpython

Include column offset information in the tokenizer #97997

New issue
Copy link
New issue
Copy link
Closed
#98000
Closed
Include column offset information in the tokenizer#97997
#98000
Copy link
Assignees
lysnikolaou
Labels
type-featureA feature request or enhancementA feature request or enhancement

Description

@lysnikolaou
lysnikolaou
opened on Oct 6, 2022
Issue body actions

The tokenizer currently only holds information about the current line number (along with the starting line number for strings that span multiple lines). This makes computing column offset harder, since it has to be done with pointer arithmetic using pointers to the beginning and end of the token (even more complicated when line continuations or multiline tokens happen).

Feature or enhancement

All of this can be significantly simplified, if we keep a column offset counter in the tokenizer state.

Activity

  1. lysnikolaou
    added
    type-featureA feature request or enhancementA feature request or enhancement
    on Oct 6, 2022
  2. lysnikolaou
    self-assigned this
    on Oct 6, 2022
  3. lysnikolaou
    added a commit that references this issue on Oct 6, 2022

    pythongh-97997: Add col_offset field to tokenizer and use that for AS…

    faefec5
  4. lysnikolaou
    linked a pull request that will close this issuegh-97997: Add col_offset field to tokenizer and use that for AST nodes #98000on Oct 7, 2022
  5. pablogsal
    closed this as completedin #98000on Oct 7, 2022
  6. pablogsal
    added a commit that references this issue on Oct 7, 2022

    gh-97997: Add col_offset field to tokenizer and use that for AST nodes (

    3de08ce
  7. carljm
    added a commit that references this issue on Oct 8, 2022

    Merge branch 'main' into typewatch

    27a4980
  8. mpage
    added a commit that references this issue on Oct 11, 2022

    pythongh-97997: Add col_offset field to tokenizer and use that for AS…

    7a39f02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @lysnikolaou
    lysnikolaou

Labels

type-featureA feature request or enhancementA feature request or enhancement

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.