Avatar
omochimetaru 9/20/2023 1:49 PM
Hey all! I am excited to share with you about what I have done with my mentor @ahoppen in this year’s GSoC project. In the past few months, I mainly worked on implementing incremental parsing for SwiftParser. The goal is to make SwiftParser parse source files incrementally when we are in some special contexts like syntax highlighting. We aims ...
1:49 PM
SwiftSyntaxのインクリメンタルパーサ開発の報告
1:50 PM
1:51 PM
このコードでswitch xを消すと、 関数呼び出し+ラベル+文だったのが、 第二後置クロージャ付きの一つの関数呼び出しに変化するのエグいw
😇 1
1:52 PM
To solve the problem above, we collect some additional information for every syntax node we parsed in the initial parse to mark the possibly influence range for each node and use that information to help us parse correctly when execute incremental parsing.
1:53 PM
あるノードに属する部分テキストを編集したときに、どの範囲までパースをやり直せば良いか、の情報を用意するようにした、のかな
1:58 PM
その範囲を判断するの文法に依存した非自明な手続きに思えるけどどうやってんだろ