How to parse/tokenize only INDENT and DEDENT tokens?
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 35/100
- Issue 類型
- 功能
- 描述清晰度
- 基本清楚
- 活躍度
- 停滯
- 技術堆疊
- javascript, typescript
- 領域
- compilers, performance
研究方向
先閱讀 getAllTokens 的實作,以及 dt-python-parser 使用的 parser/tokenizer 進入點。對一個 5,000 行的 Python 檔案進行標記化基準測試,重點關注被識別為 token 類型 93 和 94 的 INDENT 與 DEDENT 位置;當這些位置以明顯少於 getAllTokens 的等待時間返回時,即表示完成。
由索引模型根據 Issue 內容生成。
描述
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?
- 主要語言
- JavaScript
- 星號
- 25
- 分支
- 7
- PR 合併指標
- 30 天內沒有已合併 PR
貢獻指南
這個儲存庫沒有索引到貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
DTStack/dt-python-parser 的其他 Issue
-
難度 3/5 1-2 天 新手友好度 48/100
DTStack/dt-python-parser#28 ·
-
難度 5/5 一週以上 新手友好度 20/100
DTStack/dt-python-parser#27 · 1 則留言 ·
-
難度 3/5 1-2 天 新手友好度 45/100
DTStack/dt-python-parser#26 ·
-
難度 3/5 1-2 天 新手友好度 45/100
DTStack/dt-python-parser#24 · 1 則留言 ·
-
難度 5/5 一週以上 新手友好度 15/100
DTStack/dt-python-parser#15 · 3 則留言 ·
查看 DTStack/dt-python-parser 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 75/100
palladius/rails8-app-on-gcp#145 ·
-
難度 2/5 1-3 小時 新手友好度 65/100
dotenvx/dotenv-vscode#139 ·
-
test-change-proposal
難度 2/5 1-3 小時 新手友好度 65/100
web-platform-tests/interop#1455 ·
-
難度 2/5 1-3 小時 新手友好度 75/100
corsairdev/corsair#1764 ·
-
難度 2/5 1-3 小時 新手友好度 75/100