Avatar
omochimetaru 1/5/2023 7:40 AM
これだ
7:40 AM
There are two Rules of Trivia that you should obey when parsing or constructing new Syntax nodes: A token owns all of its trailing trivia up to, but not including, the next newline character. Looking backward in the text, a token owns all of the leading trivia up to and including the first newline character.
7:41 AM
この話swift syntaxリポジトリにあるかな?
7:41 AM
とりあえず今は内容が知りたかったので解決しましたが
7:44 AM
改行が来るまではtrailing triviaで、それ以降はleading triviaか。