How to parse/tokenize only INDENT and DEDENT tokens?
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- javascript, typescript
- Ambito
- compilers, performance
Direzione di ricerca
Inizia leggendo l’implementazione di getAllTokens e i punti di ingresso del parser/tokenizer utilizzati da dt-python-parser. Esegui un benchmark della tokenizzazione di un file Python di 5.000 righe, concentrandoti sulle posizioni di INDENT e DEDENT identificate come tipi di token 93 e 94; il lavoro è completato quando queste posizioni vengono restituite con un’attesa sostanzialmente inferiore rispetto a getAllTokens.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Hello, I'm working on my VS Code extension, blockman, it renders blocks based on nested code blocks to make it easier to visually perceive the code.
video:
https://youtu.be/2Ajh8WQJvHs
The "dt-python-parser" package works really well, I use "getAllTokens" function to get all the tokens from python text file and then filter only type 93 (INDENT) and type 94 (DEDENT).
I need only INDENT and DEDENT locations, nothing more, but the "getAllTokens" function tokenizes everything and therefore losing much time, so if the file has more than 1000 lines, like 5000 lines or so, getAllTokens function takes many seconds to return the value, so rendering blocks take more time and waiting is not very comfortable for a user.
So, for the optimization, can I use the parser/tokenizer in such way that it would parse only INDENT/DEDENT locations and nothing more?
- Lingua principale
- JavaScript
- Stelle
- 25
- Fork
- 7
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di DTStack/dt-python-parser
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 48/100
DTStack/dt-python-parser#28 ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
DTStack/dt-python-parser#27 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
DTStack/dt-python-parser#26 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
DTStack/dt-python-parser#24 · 1 commento ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
DTStack/dt-python-parser#15 · 3 commenti ·
Tutte le issue di DTStack/dt-python-parser
Issue simili
-
bug customer-eng Durable Agents Inngest status: needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
optimization optimization:agents-md-curator
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
githubnext/gh-aw-cao#13475 ·
-
[BUG]: "Clear All" in Settings doesn't clear the saved analysis, old data comes back after reload Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
AOSSIE-Org/OrgExplorer#253 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
oxc-project/oxc#26944 ·
-
ai-observability bug team/ai-observability
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100