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 — Tokenizer returnings pointers make calculation of position info more complicated · Issue #97973 · python/cpython

Tokenizer returnings pointers make calculation of position info more complicated #97973

New issue
Copy link
New issue
Copy link
Closed
#97984
Closed
Tokenizer returnings pointers make calculation of position info more complicated#97973
#97984
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

Bacause the tokenizer only returns pointers to the beginning and the end of the token, calculating line numbers/column offsets is more complicated than needed.

Feature or enhancement

Instead of the tokenizer returning a token type and settings pointers, we wanna return the token type (remains as is) and then set a struct token that has the following information:

  1. Pointers to beginning and end
  2. Location information (lineno, col_offset, etc.)
  3. Level (the level in the parenstack)

This way the parser will have a much easier job of setting line numbers & column offsets in the generated AST numbers and will make some of our work on the f-strings parsing easier.

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-97973: Return all necessary information from the tokenizer

    5f05ce9
  4. lysnikolaou
    linked a pull request that will close this issueGH-97973: Return all necessary information from the tokenizer #97975on Oct 6, 2022
  5. lysnikolaou
    added a commit that references this issue on Oct 6, 2022

    pythongh-97973: Return all necessary information from the tokenizer

    0a7d0f6
  6. lysnikolaou
    linked a pull request that will close this issuegh-97973: Return all necessary information from the tokenizer #97984on Oct 6, 2022
  7. lysnikolaou
    closed this as completedin #97984on Oct 6, 2022
  8. lysnikolaou
    added a commit that references this issue on Oct 6, 2022

    gh-97973: Return all necessary information from the tokenizer (GH-97984)

    cbf0afd
  9. carljm
    added a commit that references this issue on Oct 8, 2022

    Merge branch 'main' into typewatch

    415ed49
  10. mpage
    added a commit that references this issue on Oct 11, 2022

    pythongh-97973: Return all necessary information from the tokenizer (p…

    078e3ed
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.